-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ForceNew and non-empty plans caused by PodSpec defaults #1074
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import ( | |
) | ||
|
||
func dataSourceKubernetesPod() *schema.Resource { | ||
podSpecFields := podSpecFields(false, false, false) | ||
podSpecFields := podSpecFields(false, false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the |
||
// Setting this default to false prevents a perpetual diff caused by volume_mounts | ||
// being mutated on the server side as Kubernetes automatically adds a mount | ||
// for the service account token | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,15 @@ import ( | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
var testAccProviders map[string]*schema.Provider | ||
// Global constants for testing images (reduces the number of docker pulls). | ||
const ( | ||
nginxImageVersion = "nginx:1.19.4" | ||
nginxImageVersion1 = "nginx:1.19.3" | ||
busyboxImageVersion = "busybox:1.32.0" | ||
busyboxImageVersion1 = "busybox:1.31" | ||
alpineImageVersion = "alpine:3.12.1" | ||
) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added these after Docker Hub started rate-limiting pulls. I was hitting the limit with my local testing. (100 pulls per 6 hours). This is a much more polite way to use their service anyway 😄 |
||
var testAccProvider *schema.Provider | ||
var testAccExternalProviders map[string]resource.ExternalProvider | ||
var testAccProviderFactories = map[string]func() (*schema.Provider, error){ | ||
|
@@ -27,9 +35,6 @@ var testAccProviderFactories = map[string]func() (*schema.Provider, error){ | |
|
||
func init() { | ||
testAccProvider = Provider() | ||
testAccProviders = map[string]*schema.Provider{ | ||
"kubernetes": testAccProvider, | ||
} | ||
testAccProviderFactories = map[string]func() (*schema.Provider, error){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed since we're using ProviderFactories now instead. |
||
"kubernetes": func() (*schema.Provider, error) { | ||
return Provider(), nil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes the
testacc
command faster. If you need to run update-related tests (the ones with_regression
in the name, now you can runmake test-update
.It also works with non-update related tests. Sometimes I like to do this if I've made schema changes that I want to be sure are in the test run: