feat: add artifactapi_local_docker resource
The artifactapi server now serves local docker repos as real container registries, but the provider had no resource to declare one — only remote docker proxies and local terraform/pypi/rpm repos. - Add the artifactapi_local_docker resource (package_type=docker, repo_type=local), mirroring the other local resources: name + description, managed via /api/v2/remotes. - Register it in the provider and update the resource-count/type tests. - Add unit tests, an example, and a Local Resources section to the README.
This commit is contained in:
@@ -66,8 +66,8 @@ func TestProvider_Resources(t *testing.T) {
|
||||
p := &ArtifactAPIProvider{version: "1.0.0"}
|
||||
resources := p.Resources(context.Background())
|
||||
|
||||
// 10 remote resource types + 1 virtual + 1 local_terraform + 1 local_pypi + 1 local_rpm = 14
|
||||
expectedCount := 14
|
||||
// 10 remote resource types + 1 virtual + 1 local_terraform + 1 local_pypi + 1 local_rpm + 1 local_docker = 15
|
||||
expectedCount := 15
|
||||
if len(resources) != expectedCount {
|
||||
t.Fatalf("expected %d resources, got %d", expectedCount, len(resources))
|
||||
}
|
||||
@@ -110,6 +110,7 @@ func TestProvider_Resources_ContainsExpectedTypes(t *testing.T) {
|
||||
"artifactapi_local_terraform",
|
||||
"artifactapi_local_pypi",
|
||||
"artifactapi_local_rpm",
|
||||
"artifactapi_local_docker",
|
||||
}
|
||||
|
||||
for _, name := range expected {
|
||||
|
||||
Reference in New Issue
Block a user