Skip to content

Commit

Permalink
Update package name requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Dec 13, 2024
1 parent b3b6537 commit 3b5c252
Show file tree
Hide file tree
Showing 70 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This directory contains integration tests for the project.
The tree structure generally mirrors the source code tree structure.

Requirements for new files in this directory:
* Every package **must** be named after its directory with `_integration` appended
* Every package **must** be named after its directory with `_test` appended
* Requiring a different package name for integration tests avoids aliasing with the main package.
* Every integration test package **must** include a `main_test.go` file.

Expand Down
2 changes: 1 addition & 1 deletion integration/assumptions/dashboard_assumptions_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package assumptions_integration
package assumptions_test

import (
"encoding/base64"
Expand Down
2 changes: 1 addition & 1 deletion integration/assumptions/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package assumptions_integration
package assumptions_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/artifacts_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/basic_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/bind_resource_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/clusters_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/dashboards_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/deploy_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/deploy_then_remove_resources_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/deploy_to_shared_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/deployment_state_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/destroy_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/empty_bundle_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/environments_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/generate_job_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/generate_pipeline_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/helpers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/init_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/job_metadata_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/local_state_staleness_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/python_wheel_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/spark_jar_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/validate_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package bundle_integration
package bundle_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/alerts/alerts_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package alerts_integration
package alerts_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/alerts/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package alerts_integration
package alerts_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/api/api_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package api_integration
package api_test

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/api/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package api_integration
package api_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/auth/describe_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth_integration
package auth_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/auth/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth_integration
package auth_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/clusters/clusters_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package clusters_integration
package clusters_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/clusters/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package clusters_integration
package clusters_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/cat_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/completion_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/cp_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/helpers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/ls_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/mkdir_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/fs/rm_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fs_integration
package fs_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/jobs/jobs_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jobs_integration
package jobs_test

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/jobs/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jobs_integration
package jobs_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd_integration
package cmd_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/repos/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package repos_integration
package repos_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/repos/repos_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package repos_integration
package repos_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/secrets/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package secrets_integration
package secrets_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/secrets/secrets_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package secrets_integration
package secrets_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/storage_credentials/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package storage_credentials_integration
package storage_credentials_test

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package storage_credentials_integration
package storage_credentials_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/sync/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sync_integration
package sync_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/sync/sync_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sync_integration
package sync_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/unknown_command_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd_integration
package cmd_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/version/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package version_integration
package version_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/version/version_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package version_integration
package version_test

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/workspace/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace_integration
package workspace_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/workspace/workspace_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package workspace_integration
package workspace_test

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions integration/enforce_convention_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ func enumeratePackages(t *testing.T) map[string]packageInfo {
return pkgmap
}

// TestEnforcePackageNames checks that all integration test package names use the "_integration" suffix.
// TestEnforcePackageNames checks that all integration test package names use the "_test" suffix.
// We enforce this package name to avoid package name aliasing.
func TestEnforcePackageNames(t *testing.T) {
pkgmap := enumeratePackages(t)
for _, pkg := range pkgmap {
assert.True(t, strings.HasSuffix(pkg.Name, "_integration"), "Package name %s does not end with _integration", pkg.Name)
assert.True(t, strings.HasSuffix(pkg.Name, "_test"), "Package name %s does not end with _test", pkg.Name)
}
}

Expand Down
2 changes: 1 addition & 1 deletion integration/libs/filer/filer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package filer_integration
package filer_test

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion integration/libs/filer/helpers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package filer_integration
package filer_test

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion integration/libs/filer/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package filer_integration
package filer_test

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion integration/libs/git/git_clone_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package git_integration
package git_test

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion integration/libs/git/git_fetch_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package git_integration
package git_test

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion integration/libs/git/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package git_integration
package git_test

import (
"testing"
Expand Down
Loading

0 comments on commit 3b5c252

Please sign in to comment.