(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestInspect(t *testing.T) { |
| 12 | cli := makeFakeCli(t) |
| 13 | createTestContext(t, cli, "current", map[string]any{ |
| 14 | "MyCustomMetadata": "MyCustomMetadataValue", |
| 15 | }) |
| 16 | cli.OutBuffer().Reset() |
| 17 | assert.NilError(t, runInspect(cli, inspectOptions{ |
| 18 | refs: []string{"current"}, |
| 19 | })) |
| 20 | expected := string(golden.Get(t, "inspect.golden")) |
| 21 | si := cli.ContextStore().GetStorageInfo("current") |
| 22 | expected = strings.Replace(expected, "<METADATA_PATH>", strings.ReplaceAll(si.MetadataPath, `\`, `\\`), 1) |
| 23 | expected = strings.Replace(expected, "<TLS_PATH>", strings.ReplaceAll(si.TLSPath, `\`, `\\`), 1) |
| 24 | assert.Equal(t, cli.OutBuffer().String(), expected) |
| 25 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…