cmd/mbf: package status dashboard
All checks were successful
Test / Create distribution (push) Successful in 1m36s
Test / Sandbox (push) Successful in 5m44s
Test / Sandbox (race detector) (push) Successful in 8m14s
Test / ShareFS (push) Successful in 8m38s
Test / Hakurei (race detector) (push) Successful in 10m57s
Test / Hakurei (push) Successful in 6m38s
Test / Flake checks (push) Successful in 2m56s
All checks were successful
Test / Create distribution (push) Successful in 1m36s
Test / Sandbox (push) Successful in 5m44s
Test / Sandbox (race detector) (push) Successful in 8m14s
Test / ShareFS (push) Successful in 8m38s
Test / Hakurei (race detector) (push) Successful in 10m57s
Test / Hakurei (push) Successful in 6m38s
Test / Flake checks (push) Successful in 2m56s
This displays package metadata with optional status from a report.
This commit was merged in pull request #33.
This commit is contained in:
@@ -95,7 +95,7 @@ status : not in report
|
||||
var (
|
||||
cm *cache
|
||||
buf strings.Builder
|
||||
rp string
|
||||
r *rosa.Report
|
||||
)
|
||||
|
||||
if tc.status != nil || tc.report != "" {
|
||||
@@ -108,14 +108,25 @@ status : not in report
|
||||
}
|
||||
|
||||
if tc.report != "" {
|
||||
rp = filepath.Join(t.TempDir(), "report")
|
||||
if err := os.WriteFile(
|
||||
rp,
|
||||
pathname := filepath.Join(t.TempDir(), "report")
|
||||
err := os.WriteFile(
|
||||
pathname,
|
||||
unsafe.Slice(unsafe.StringData(tc.report), len(tc.report)),
|
||||
0400,
|
||||
); err != nil {
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
r, err = rosa.OpenReport(pathname)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer func() {
|
||||
if err = r.Close(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
if tc.status != nil {
|
||||
@@ -157,7 +168,7 @@ status : not in report
|
||||
tc.args,
|
||||
&buf,
|
||||
cm != nil,
|
||||
rp,
|
||||
r,
|
||||
); !reflect.DeepEqual(err, wantErr) {
|
||||
t.Fatalf("commandInfo: error = %v, want %v", err, wantErr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user