Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Enable endpoints controller and selectively run acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ishustava committed Mar 25, 2021
1 parent e8c1cbb commit a424ea6
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 33 deletions.
15 changes: 7 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
machine:
image: ubuntu-2004:202010-01
resource_class: xlarge
parallelism: 6
parallelism: 5
steps:
- checkout
- run:
Expand Down Expand Up @@ -133,18 +133,17 @@ jobs:
# exit early if any test fails (-failfast only works within a single
# package).
exit_code=0
pkgs=$(go list ./... | circleci tests split)
pkgs=$(go list ./... | grep -v -E 'metrics|example|sync|basic|consul-dns' | circleci tests split)
echo "Running $pkgs"
for pkg in $pkgs
do
if ! gotestsum --no-summary=all --jsonfile=jsonfile-${pkg////-} -- $pkg -p 1 -timeout 30m -failfast \
-use-kind \
-enable-multi-cluster \
-enable-enterprise \
-kubecontext="kind-dc1" \
-secondary-kubecontext="kind-dc2" \
-debug-directory="$TEST_RESULTS/debug" \
-consul-k8s-image=docker.mirror.hashicorp.services/hashicorpdev/consul-k8s:latest
-consul-k8s-image=ishustava/consul-k8s-dev:03-25-2021-f87dc11
then
echo "Tests in ${pkg} failed, aborting early"
exit_code=1
Expand Down Expand Up @@ -646,10 +645,10 @@ workflows:
- go-fmt-and-vet-helm-gen
- test-helm-gen
- unit-helm
- acceptance:
requires:
- unit-helm
- unit-acceptance-framework
- acceptance
# requires:
# - unit-helm
# - unit-acceptance-framework
nightly-acceptance-tests:
triggers:
- schedule:
Expand Down
4 changes: 2 additions & 2 deletions test/acceptance/tests/connect/connect_inject_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func TestConnectInject(t *testing.T) {
autoEncrypt bool
}{
{false, false},
{true, false},
{true, true},
//{true, false},
//{true, true},
}

for _, c := range cases {
Expand Down
4 changes: 2 additions & 2 deletions test/acceptance/tests/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func TestController(t *testing.T) {
autoEncrypt bool
}{
{false, false},
{true, false},
{true, true},
//{true, false},
//{true, true},
}

// The name of a service intention in consul is
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#resources:
# - deployment.yaml
# - serviceaccount.yaml
# - rolebinding.yaml
resources:
- deployment.yaml
- service.yaml
- serviceaccount.yaml
- rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: static-client
spec:
selector:
app: static-client
ports:
- port: 80
16 changes: 8 additions & 8 deletions test/acceptance/tests/ingress-gateway/ingress_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ func TestIngressGateway(t *testing.T) {
false,
false,
},
{
true,
false,
},
{
true,
true,
},
//{
// true,
// false,
//},
//{
// true,
// true,
//},
}
for _, c := range cases {
name := fmt.Sprintf("secure: %t; auto-encrypt: %t", c.secure, c.autoEncrypt)
Expand Down
2 changes: 2 additions & 0 deletions test/acceptance/tests/mesh-gateway/mesh_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ func TestMeshGatewayDefault(t *testing.T) {
// Test that Connect and wan federation over mesh gateways work in a secure installation,
// with ACLs and TLS with and without auto-encrypt enabled.
func TestMeshGatewaySecure(t *testing.T) {
// Skip until the endpoints controller supports TLS and ACLs.
t.Skip()
cases := []struct {
name string
enableAutoEncrypt string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ func TestTerminatingGateway(t *testing.T) {
false,
false,
},
{
true,
true,
},
{
true,
true,
},
//{
// true,
// true,
//},
//{
// true,
// true,
//},
}
for _, c := range cases {
name := fmt.Sprintf("secure: %t, auto-encrypt: %t", c.secure, c.autoEncrypt)
Expand Down
2 changes: 1 addition & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ connectInject:
# ServiceIntentions require consul 1.9+.
controller:
# Enables the controller for managing custom resources.
enabled: false
enabled: true

# The number of deployment replicas.
replicas: 1
Expand Down

0 comments on commit a424ea6

Please sign in to comment.