Add artifactapi_local_generic resource
Adds a local generic (raw-file) repository resource so arbitrary binaries -- the bootapi node rootfs tarballs -- can be hosted on artifactapi and managed in Terraform. The backend already serves generic locals; only the provider surface was missing. - resource_local_generic.go: local repo with package_type=generic (mirrors local_rpm), registered in the provider. - Tests + example. Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
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 + 1 local_docker = 15
|
||||
expectedCount := 15
|
||||
// 10 remote resource types + 1 virtual + local_terraform/pypi/rpm/docker/generic = 16
|
||||
expectedCount := 16
|
||||
if len(resources) != expectedCount {
|
||||
t.Fatalf("expected %d resources, got %d", expectedCount, len(resources))
|
||||
}
|
||||
@@ -111,6 +111,7 @@ func TestProvider_Resources_ContainsExpectedTypes(t *testing.T) {
|
||||
"artifactapi_local_pypi",
|
||||
"artifactapi_local_rpm",
|
||||
"artifactapi_local_docker",
|
||||
"artifactapi_local_generic",
|
||||
}
|
||||
|
||||
for _, name := range expected {
|
||||
|
||||
Reference in New Issue
Block a user