Skip to content

Commit

Permalink
review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
briandealwis committed Jun 19, 2020
1 parent d1b2941 commit a6864b3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 47 deletions.
8 changes: 3 additions & 5 deletions integration/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,30 @@ func TestDebug(t *testing.T) {
}{
{
description: "kubectl",
config: "skaffold.yaml",
deployments: []string{"java"},
pods: []string{"nodejs", "npm", "python3", "go"},
},
{
description: "kustomize",
config: "skaffold.yaml",
args: []string{"--profile", "kustomize"},
deployments: []string{"java"},
pods: []string{"nodejs", "npm", "python3", "go"},
},
{
description: "buildpacks",
config: "skaffold-bp.yaml",
args: []string{"--profile", "buildpacks"},
deployments: []string{"java"},
pods: []string{"nodejs", "npm", "python3", "go"},
},
}
for _, test := range tests {
t.Run(test.description, func(t *testing.T) {
// Run skaffold build first to fail quickly on a build failure
skaffold.Build(test.args...).InDir("testdata/debug").WithConfig(test.config).RunOrFail(t)
skaffold.Build(test.args...).InDir("testdata/debug").RunOrFail(t)

ns, client := SetupNamespace(t)

skaffold.Debug(test.args...).InDir("testdata/debug").WithConfig(test.config).InNs(ns.Name).RunBackground(t)
skaffold.Debug(test.args...).InDir("testdata/debug").InNs(ns.Name).RunBackground(t)

verifyDebugAnnotations := func(annotations map[string]string) {
var configs map[string]debug.ContainerDebugConfiguration
Expand Down
40 changes: 0 additions & 40 deletions integration/testdata/debug/skaffold-bp.yaml

This file was deleted.

31 changes: 29 additions & 2 deletions integration/testdata/debug/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,35 @@ deploy:
- npm/k8s/pod.yaml
- python3/k8s/pod.yaml
- go/k8s/pod.yaml

profiles:
- name: kustomize
deploy:
- name: kustomize
deploy:
kustomize: {}
kubectl: {}
# use GCP Buildpacks to build the individual projects
- name: buildpacks
build:
artifacts:
- image: skaffold-debug-java
context: java
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
- image: skaffold-debug-npm
context: npm
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
- image: skaffold-debug-nodejs
context: nodejs
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
- image: skaffold-debug-python3
context: python3
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
- image: skaffold-debug-go
context: go
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
env:
- GOOGLE_GCFLAGS="-gcflags='all=-N -l'"

0 comments on commit a6864b3

Please sign in to comment.