()
| 91 | } |
| 92 | |
| 93 | func (g *GCSRegistryStore) Teardown() error { |
| 94 | bucket, object, err := g.parseGCSPath() |
| 95 | if err != nil { |
| 96 | return err |
| 97 | } |
| 98 | |
| 99 | ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) |
| 100 | defer cancel() |
| 101 | |
| 102 | return g.client.DeleteObject(ctx, bucket, object) |
| 103 | } |
| 104 | |
| 105 | func (g *GCSRegistryStore) parseGCSPath() (string, string, error) { |
| 106 | uri, err := url.Parse(g.registryPath) |
nothing calls this directly
no test coverage detected