From 7d0ba03fff44b1f4e222d91d9007230e2f266e38 Mon Sep 17 00:00:00 2001 From: Fernando Alfaro Campos Date: Wed, 25 Sep 2024 16:54:47 -0400 Subject: [PATCH] Powerscale E2E Test Fixes (#705) * Add Powerscale port variable * Template auth variables * Update go files * Add Powerscale port variable handling * Fix scenarios for PowerScale * Update powerscale template files --- tests/e2e/go.sum | 29 ----------------- tests/e2e/steps/steps_def.go | 30 +++++++++++------ .../karavi-authorization-config.json | 4 +-- .../powerscale-auth-secret-template.yaml | 8 +++-- .../powerscale-secret-template.yaml | 2 +- tests/e2e/testfiles/scenarios.yaml | 32 +++++++++++++------ .../e2e/testfiles/storage_csm_powerscale.yaml | 23 +++++++++++++ .../storage_csm_powerscale_auth.yaml | 10 +++++- .../storage_csm_powerscale_resiliency.yaml | 17 ---------- 9 files changed, 82 insertions(+), 73 deletions(-) diff --git a/tests/e2e/go.sum b/tests/e2e/go.sum index 3b584de68..e3359b611 100644 --- a/tests/e2e/go.sum +++ b/tests/e2e/go.sum @@ -50,8 +50,6 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -91,8 +89,6 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= @@ -140,13 +136,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -238,18 +229,12 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= -golang.org/x/exp v0.0.0-20221028150844-83b7d23a625f h1:Al51T6tzvuh3oiwX11vex3QgJ2XTedFPGmbEVh8cdoc= -golang.org/x/exp v0.0.0-20221028150844-83b7d23a625f/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -257,8 +242,6 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= @@ -267,27 +250,19 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= @@ -296,8 +271,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -316,8 +289,6 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1: google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tests/e2e/steps/steps_def.go b/tests/e2e/steps/steps_def.go index f41887527..bda25653a 100644 --- a/tests/e2e/steps/steps_def.go +++ b/tests/e2e/steps/steps_def.go @@ -53,9 +53,9 @@ var ( quotaLimit = "30000000" pflexSecretMap = map[string]string{"REPLACE_USER": "PFLEX_USER", "REPLACE_PASS": "PFLEX_PASS", "REPLACE_SYSTEMID": "PFLEX_SYSTEMID", "REPLACE_ENDPOINT": "PFLEX_ENDPOINT", "REPLACE_MDM": "PFLEX_MDM", "REPLACE_POOL": "PFLEX_POOL"} pflexAuthSecretMap = map[string]string{"REPLACE_USER": "PFLEX_USER", "REPLACE_SYSTEMID": "PFLEX_SYSTEMID", "REPLACE_ENDPOINT": "PFLEX_AUTH_ENDPOINT", "REPLACE_MDM": "PFLEX_MDM"} - pscaleSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT"} - pscaleAuthSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_PORT": "PSCALE_AUTH_PORT", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT"} - pscaleAuthSidecarMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_PORT": "PSCALE_AUTH_PORT"} + pscaleSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_PORT": "PSCALE_PORT"} + pscaleAuthSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_AUTH_PORT": "PSCALE_AUTH_PORT", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_PORT": "PSCALE_PORT"} + pscaleAuthSidecarMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_AUTH_PORT": "PSCALE_AUTH_PORT", "REPLACE_PORT": "PSCALE_PORT"} pflexAuthSidecarMap = map[string]string{"REPLACE_USER": "PFLEX_USER", "REPLACE_PASS": "PFLEX_PASS", "REPLACE_SYSTEMID": "PFLEX_SYSTEMID", "REPLACE_ENDPOINT": "PFLEX_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PFLEX_AUTH_ENDPOINT"} pmaxCredMap = map[string]string{"REPLACE_USER": "PMAX_USER_ENCODED", "REPLACE_PASS": "PMAX_PASS_ENCODED"} pmaxAuthSidecarMap = map[string]string{"REPLACE_SYSTEMID": "PMAX_SYSTEMID", "REPLACE_ENDPOINT": "PMAX_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PMAX_AUTH_ENDPOINT"} @@ -67,7 +67,7 @@ var ( pflexCrMap = map[string]string{"REPLACE_STORAGE_NAME": "PFLEX_STORAGE", "REPLACE_STORAGE_TYPE": "PFLEX_STORAGE", "REPLACE_ENDPOINT": "PFLEX_ENDPOINT", "REPLACE_SYSTEM_ID": "PFLEX_SYSTEMID", "REPLACE_VAULT_STORAGE_PATH": "PFLEX_VAULT_STORAGE_PATH", "REPLACE_ROLE_NAME": "PFLEX_ROLE", "REPLACE_QUOTA": "PFLEX_QUOTA", "REPLACE_STORAGE_POOL_PATH": "PFLEX_POOL", "REPLACE_TENANT_NAME": "PFLEX_TENANT", "REPLACE_TENANT_ROLES": "PFLEX_ROLE", "REPLACE_TENANT_VOLUME_PREFIX": "PFLEX_TENANT_PREFIX"} // Auth V2 - pscaleCrMap = map[string]string{"REPLACE_STORAGE_NAME": "PSCALE_STORAGE", "REPLACE_STORAGE_TYPE": "PSCALE_STORAGE", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_SYSTEM_ID": "PSCALE_CLUSTER", "REPLACE_VAULT_STORAGE_PATH": "PSCALE_VAULT_STORAGE_PATH", "REPLACE_ROLE_NAME": "PSCALE_ROLE", "REPLACE_QUOTA": "PSCALE_QUOTA", "REPLACE_STORAGE_POOL_PATH": "PSCALE_POOL_V2", "REPLACE_TENANT_NAME": "PSCALE_TENANT", "REPLACE_TENANT_ROLES": "PSCALE_ROLE", "REPLACE_TENANT_VOLUME_PREFIX": "PSCALE_TENANT_PREFIX"} + pscaleCrMap = map[string]string{"REPLACE_STORAGE_NAME": "PSCALE_STORAGE", "REPLACE_STORAGE_TYPE": "PSCALE_STORAGE", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_SYSTEM_ID": "PSCALE_CLUSTER", "REPLACE_VAULT_STORAGE_PATH": "PSCALE_VAULT_STORAGE_PATH", "REPLACE_ROLE_NAME": "PSCALE_ROLE", "REPLACE_QUOTA": "PSCALE_QUOTA", "REPLACE_STORAGE_POOL_PATH": "PSCALE_POOL_V2", "REPLACE_TENANT_NAME": "PSCALE_TENANT", "REPLACE_TENANT_ROLES": "PSCALE_ROLE", "REPLACE_TENANT_VOLUME_PREFIX": "PSCALE_TENANT_PREFIX", "REPLACE_PORT": "PSCALE_PORT"} pstoreSecretMap = map[string]string{"REPLACE_USER": "PSTORE_USER", "REPLACE_PASS": "PSTORE_PASS", "REPLACE_GLOBALID": "PSTORE_GLOBALID", "REPLACE_ENDPOINT": "PSTORE_ENDPOINT"} ) @@ -328,7 +328,7 @@ func (step *Step) deleteCustomResource(res Resource, crNumStr string) error { func (step *Step) validateCustomResourceStatus(res Resource, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1] - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) found := new(csmv1.ContainerStorageModule) err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -346,13 +346,13 @@ func (step *Step) validateCustomResourceStatus(res Resource, crNumStr string) er func (step *Step) validateDriverInstalled(res Resource, driverName string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) return checkAllRunningPods(context.TODO(), res.CustomResource[crNum-1].Namespace, step.clientSet) } func (step *Step) validateDriverNotInstalled(res Resource, driverName string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) return checkNoRunningPods(context.TODO(), res.CustomResource[crNum-1].Namespace, step.clientSet) } @@ -379,7 +379,7 @@ func (step *Step) removeNodeLabel(res Resource, label string) error { func (step *Step) validateModuleInstalled(res Resource, module string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1] - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) found := new(csmv1.ContainerStorageModule) if err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -424,7 +424,7 @@ func (step *Step) validateModuleInstalled(res Resource, module string, crNumStr func (step *Step) validateModuleNotInstalled(res Resource, module string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1] - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) found := new(csmv1.ContainerStorageModule) if err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -889,7 +889,7 @@ func (step *Step) runCustomTest(res Resource) error { func (step *Step) enableModule(res Resource, module string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1] - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) found := new(csmv1.ContainerStorageModule) if err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -1303,6 +1303,16 @@ func (step *Step) AuthorizationV1Resources(storageType, driver, port, proxyHost, // get env variables if os.Getenv(endpointvar) != "" { endpoint = os.Getenv(endpointvar) + + if driver == "powerscale" { + port := os.Getenv("PSCALE_PORT") + if port == "" { + fmt.Println("=== PSCALE_PORT not set, using default port 8080 ===") + port = "8080" + } + + endpoint = endpoint + ":" + port + } } if os.Getenv(systemIdvar) != "" { sysID = os.Getenv(systemIdvar) diff --git a/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json b/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json index db4954d1b..3fbb297d9 100644 --- a/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json +++ b/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json @@ -1,8 +1,8 @@ [{ "username":"-", "password":"-", - "intendedEndpoint":"https://REPLACE_ENDPOINT", - "endpoint":"https://REPLACE_AUTH_ENDPOINT:REPLACE_PORT", + "intendedEndpoint":"https://REPLACE_ENDPOINT:REPLACE_PORT", + "endpoint":"https://REPLACE_AUTH_ENDPOINT:REPLACE_AUTH_PORT", "systemID": "REPLACE_CLUSTERNAME", "insecure":true, "isDefault":true diff --git a/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml b/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml index e442ca485..ff6675556 100644 --- a/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml +++ b/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml @@ -1,9 +1,11 @@ isilonClusters: - clusterName: "REPLACE_CLUSTERNAME" - username: "REPLACE_USER" - password: "REPLACE_PASS" + username: "-" + password: "-" isDefault: true endpoint: "REPLACE_AUTH_ENDPOINT" - endpointPort: "REPLACE_PORT" + endpointPort: REPLACE_AUTH_PORT skipCertificateValidation: true mountEndpoint: "REPLACE_ENDPOINT" + isiPath: "/ifs/data/csi" + isiVolumePathPermissions: "0777" diff --git a/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml b/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml index 7d04acbe5..95e0132a5 100644 --- a/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml +++ b/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml @@ -5,4 +5,4 @@ isilonClusters: isDefault: true endpoint: "REPLACE_ENDPOINT" skipCertificateValidation: true - endpointPort: 8080 + endpointPort: "REPLACE_PORT" diff --git a/tests/e2e/testfiles/scenarios.yaml b/tests/e2e/testfiles/scenarios.yaml index 8332a7b7a..10884e226 100644 --- a/tests/e2e/testfiles/scenarios.yaml +++ b/tests/e2e/testfiles/scenarios.yaml @@ -263,7 +263,7 @@ - scenario: "Install PowerScale Driver(With Authorization V1)" paths: - - "testfiles/authorization-templates/csm_authorization_proxy_server_n_minus_1.yaml" + - "testfiles/authorization-templates/csm_authorization_proxy_server_no_cert.yaml" - "testfiles/storage_csm_powerscale_auth.yaml" tags: - "authorizationproxyserver" @@ -367,13 +367,12 @@ - scenario: "Install PowerScale Driver, Enable/Disable Authorization V1 module" paths: - - "testfiles/authorization-templates/csm_authorization_proxy_server_n_minus_1.yaml" + - "testfiles/authorization-templates/csm_authorization_proxy_server_no_cert.yaml" - "testfiles/storage_csm_powerscale.yaml" tags: - "authorizationproxyserver" - "authorization" - "powerscale" - # - "sanity" steps: - "Given an environment with k8s or openshift, and CSM operator installed" - "Create [authorization-proxy-server] prerequisites from CR [1]" @@ -387,13 +386,14 @@ - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is not installed" - "Enable [authorization] module from CR [2]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscaleAuth]" - "Set secret for driver from CR [2] to [isilon-creds-auth]" - "Set up secret with template [testfiles/powerscale-templates/karavi-authorization-config.json] name [karavi-authorization-config] in namespace [isilon] for [pscaleAuthSidecar]" - "Set up secret with template [testfiles/authorization-templates/rootCertificate.pem] name [proxy-server-root-certificate] in namespace [isilon] for [authSidecarCert]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is installed" - - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscale]" - "Disable [authorization] module from CR [2]" + - "Set secret for driver from CR [2] to [isilon-creds]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is not installed" # cleanup @@ -403,6 +403,8 @@ - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" + - "Restore template [testfiles/powerscale-templates/powerscale-storageclass-template.yaml] for [pscale]" + - "Restore template [testfiles/powerscale-templates/rootCertificate.pem] for [authSidecarCert]" - scenario: "Install PowerScale Driver(With Observability)" paths: @@ -435,6 +437,7 @@ - "observability" steps: - "Given an environment with k8s or openshift, and CSM operator installed" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Apply custom resource [1]" - "Validate custom resource [1]" - "Validate [powerscale] driver from CR [1] is installed" @@ -449,6 +452,7 @@ # cleanup - "Enable forceRemoveDriver on CR [1]" - "Delete custom resource [1]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - scenario: "Install PowerScale Driver(With Observability and Custom Certs)" paths: @@ -478,7 +482,6 @@ - "authorization" - "powerscale" - "observability" - # - "sanity" steps: - "Given an environment with k8s or openshift, and CSM operator installed" - "Create [authorization-proxy-server] prerequisites from CR [1]" @@ -534,6 +537,7 @@ - "Set secret for driver from CR [2] to [isilon-creds-auth]" - "Set up secret with template [testfiles/powerscale-templates/karavi-authorization-config.json] name [karavi-authorization-config] in namespace [isilon] for [pscaleAuthSidecar]" - "Set up secret with template [testfiles/authorization-templates/rootCertificate.pem] name [proxy-server-root-certificate] in namespace [isilon] for [authSidecarCert]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscaleAuth]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is installed" - "Validate [observability] module from CR [2] is not installed" @@ -547,8 +551,10 @@ - "Delete custom resource [1]" - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" + - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" + - "Restore template [testfiles/authorization-templates/rootCertificate.pem] for [authSidecarCert]" -- scenario: "Install PowerScale Driver(With Authorization V1 and Observability), Disable Authorization module, Disable Observability module" +- scenario: "Install PowerScale Driver(With Authorization V1 and Observability), Disable Observability module, Disable Authorization module" paths: - "testfiles/authorization-templates/csm_authorization_proxy_server_no_cert.yaml" - "testfiles/storage_csm_powerscale_observability_auth.yaml" @@ -572,14 +578,15 @@ - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is installed" - "Validate [observability] module from CR [2] is installed" + - "Disable [observability] module from CR [2]" + - "Validate [powerscale] driver from CR [2] is installed" + - "Validate [authorization] module from CR [2] is installed" + - "Validate [observability] module from CR [2] is not installed" - "Disable [authorization] module from CR [2]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Set secret for driver from CR [2] to [isilon-creds]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is not installed" - - "Validate [observability] module from CR [2] is installed" - - "Disable [observability] module from CR [2]" - - "Validate [powerscale] driver from CR [2] is installed" - - "Validate [authorization] module from CR [2] is not installed" - "Validate [observability] module from CR [2] is not installed" - "Run custom test" # cleanup @@ -590,6 +597,7 @@ - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" - "Restore template [testfiles/authorization-templates/rootCertificate.pem] for [authSidecarCert]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" customTest: name: Cert CSI run: @@ -1183,6 +1191,7 @@ - "resiliency" steps: - "Given an environment with k8s or openshift, and CSM operator installed" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Apply custom resource [1]" - "Validate custom resource [1]" - "Validate [powerscale] driver from CR [1] is installed" @@ -1191,6 +1200,7 @@ # cleanup - "Enable forceRemoveDriver on CR [1]" - "Delete custom resource [1]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" customTest: name: CustomTest run: @@ -1205,6 +1215,7 @@ - "sanity" steps: - "Given an environment with k8s or openshift, and CSM operator installed" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Apply custom resource [1]" - "Validate custom resource [1]" - "Validate [powerscale] driver from CR [1] is installed" @@ -1218,6 +1229,7 @@ # cleanup - "Enable forceRemoveDriver on CR [1]" - "Delete custom resource [1]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - scenario: "Install PowerScale Driver and PowerFlex Driver, uninstall PowerFlex Driver" paths: diff --git a/tests/e2e/testfiles/storage_csm_powerscale.yaml b/tests/e2e/testfiles/storage_csm_powerscale.yaml index e1172fd30..953f7b7d2 100644 --- a/tests/e2e/testfiles/storage_csm_powerscale.yaml +++ b/tests/e2e/testfiles/storage_csm_powerscale.yaml @@ -312,6 +312,14 @@ spec: # image: Defines karavi-topology image. This shouldn't be changed # Allowed values: string image: dellemc/csm-topology:v1.9.0 + # certificate: base64-encoded certificate for cert/private-key pair -- add cert here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + certificate: "" + # privateKey: base64-encoded private key for cert/private-key pair -- add private key here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + privateKey: "" envs: # topology log level # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC @@ -324,12 +332,27 @@ spec: # image: Defines otel-collector image. This shouldn't be changed # Allowed values: string image: otel/opentelemetry-collector:0.42.0 + # certificate: base64-encoded certificate for cert/private-key pair -- add cert here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + certificate: "" + # privateKey: base64-encoded private key for cert/private-key pair -- add private key here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + privateKey: "" envs: # image of nginx proxy image # Allowed values: string # Default value: "nginxinc/nginx-unprivileged:1.20" - name: "NGINX_PROXY_IMAGE" value: "nginxinc/nginx-unprivileged:1.20" + # enabled: Enable/Disable cert-manager + # Allowed values: + # true: enable deployment of cert-manager + # false: disable deployment of cert-manager only if it's already deployed + # Default value: true + - name: cert-manager + enabled: false - name: metrics-powerscale # enabled: Enable/Disable PowerScale metrics enabled: false diff --git a/tests/e2e/testfiles/storage_csm_powerscale_auth.yaml b/tests/e2e/testfiles/storage_csm_powerscale_auth.yaml index 99a1154c7..6176b4436 100644 --- a/tests/e2e/testfiles/storage_csm_powerscale_auth.yaml +++ b/tests/e2e/testfiles/storage_csm_powerscale_auth.yaml @@ -16,6 +16,7 @@ spec: replicas: 1 dnsPolicy: ClusterFirstWithHostNet forceUpdate: true + forceRemoveDriver: true common: image: "dellemc/csi-isilon:nightly" imagePullPolicy: IfNotPresent @@ -33,7 +34,7 @@ spec: # Allowed value: valid port number # Default value: 8080 - name: X_CSI_ISI_PORT - value: "" + value: "8080" # X_CSI_ISI_PATH: The base path for the volumes to be created on PowerScale cluster. # This value acts as a default value for isiPath, if not specified for a cluster config in secret # Ensure that this path exists on PowerScale cluster. @@ -65,6 +66,13 @@ spec: # Default value: true - name: X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION value: "true" + # X_CSI_ISI_AUTH_TYPE: Specify the authentication method to be used. + # Allowed values: + # 0: basic authentication + # 1: session-based authentication + # Default value: 0 + - name: X_CSI_ISI_AUTH_TYPE + value: "1" # X_CSI_CUSTOM_TOPOLOGY_ENABLED: Specify if custom topology label .dellemc.com/: # has to be used for making connection to backend PowerScale Array. # If X_CSI_CUSTOM_TOPOLOGY_ENABLED is set to true, then do not specify allowedTopologies in storage class. diff --git a/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml b/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml index 5409ef5bb..badf06f20 100644 --- a/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml +++ b/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml @@ -293,20 +293,3 @@ spec: - "--driver-config-params=/csi-isilon-config-params/driver-config-params.yaml" - "--driverPodLabelValue=dell-storage" - "--ignoreVolumelessPods=false" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: isilon-config-params - namespace: isilon -data: - driver-config-params.yaml: | - CSI_LOG_LEVEL: "debug" - CSI_LOG_FORMAT: "TEXT" - PODMON_CONTROLLER_LOG_LEVEL: "debug" - PODMON_CONTROLLER_LOG_FORMAT: "TEXT" - PODMON_NODE_LOG_LEVEL: "debug" - PODMON_NODE_LOG_FORMAT: "TEXT" -spec: - driver: - configVersion: v2.11.0