Skip to content

Commit

Permalink
Fix invalid registry platform os/arch used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasslash committed Dec 7, 2022
1 parent 9006329 commit 22885be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions helper_test.go
Expand Up @@ -1411,8 +1411,8 @@ func createRegistryProviderPlatform(t *testing.T, client *Client, provider *Regi
ctx := context.Background()

options := RegistryProviderPlatformCreateOptions{
OS: randomString(t),
Arch: randomString(t),
OS: "linux",
Arch: "amd64",
Shasum: genSha(t),
Filename: randomString(t),
}
Expand Down
26 changes: 13 additions & 13 deletions registry_provider_platform_integration_test.go
Expand Up @@ -31,8 +31,8 @@ func TestRegistryProviderPlatformsCreate(t *testing.T) {

t.Run("with valid options", func(t *testing.T) {
options := RegistryProviderPlatformCreateOptions{
OS: "foo",
Arch: "scrimbles",
OS: "linux",
Arch: "amd64",
Shasum: "shasum",
Filename: "filename",
}
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestRegistryProviderPlatformsCreate(t *testing.T) {
t.Run("without an OS", func(t *testing.T) {
options := RegistryProviderPlatformCreateOptions{
OS: "",
Arch: "scrimbles",
Arch: "amd64",
Shasum: "shasum",
Filename: "filename",
}
Expand All @@ -89,8 +89,8 @@ func TestRegistryProviderPlatformsCreate(t *testing.T) {

t.Run("without a shasum", func(t *testing.T) {
options := RegistryProviderPlatformCreateOptions{
OS: "os",
Arch: "scrimbles",
OS: "linux",
Arch: "amd64",
Shasum: "",
Filename: "filename",
}
Expand All @@ -103,8 +103,8 @@ func TestRegistryProviderPlatformsCreate(t *testing.T) {

t.Run("without a filename", func(t *testing.T) {
options := RegistryProviderPlatformCreateOptions{
OS: "os",
Arch: "scrimbles",
OS: "linux",
Arch: "amd64",
Shasum: "shasum",
Filename: "",
}
Expand All @@ -117,8 +117,8 @@ func TestRegistryProviderPlatformsCreate(t *testing.T) {

t.Run("with a public provider", func(t *testing.T) {
options := RegistryProviderPlatformCreateOptions{
OS: "os",
Arch: "scrimbles",
OS: "linux",
Arch: "amd64",
Shasum: "shasum",
Filename: "filename",
}
Expand All @@ -140,8 +140,8 @@ func TestRegistryProviderPlatformsCreate(t *testing.T) {

t.Run("without a valid registry provider version id", func(t *testing.T) {
options := RegistryProviderPlatformCreateOptions{
OS: "os",
Arch: "scrimbles",
OS: "linux",
Arch: "amd64",
Shasum: "shasum",
Filename: "filename",
}
Expand Down Expand Up @@ -199,8 +199,8 @@ func TestRegistryProviderPlatformsDelete(t *testing.T) {
t.Run("with a non-existent version", func(t *testing.T) {
platformID := RegistryProviderPlatformID{
RegistryProviderVersionID: versionID,
OS: "nope",
Arch: "no",
OS: "linux",
Arch: "amd64",
}

err := client.RegistryProviderPlatforms.Delete(ctx, platformID)
Expand Down

0 comments on commit 22885be

Please sign in to comment.