diff --git a/Jenkinsfile b/Jenkinsfile index 5978288a..ce60f641 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -66,13 +66,17 @@ spec: stage('Release') { steps { container("goreleaser") { - sh ( - label: "build clean release", - script: """ - git checkout \$(git rev-parse --verify ${params.TAG_NAME}) - GORELEASER_CURRENT_TAG=${params.TAG_NAME} make build-release - """ - ) + withCredentials([ + string(credentialsId: 'common-segmentio--api-token--secret-text', variable: 'SEGMENT_TOKEN'), + ]) { + sh ( + label: "build clean release", + script: """ + git checkout \$(git rev-parse --verify ${params.TAG_NAME}) + GORELEASER_CURRENT_TAG=${params.TAG_NAME}} make build-release + """ + ) + } } container("digicert") { withCredentials([ diff --git a/examples/terraform/aws-simple/.terraform.lock.hcl b/examples/terraform/aws-simple/.terraform.lock.hcl index 07a86279..45a7a1be 100644 --- a/examples/terraform/aws-simple/.terraform.lock.hcl +++ b/examples/terraform/aws-simple/.terraform.lock.hcl @@ -2,25 +2,25 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "5.74.0" + version = "5.79.0" constraints = ">= 5.46.0, >= 5.55.0" hashes = [ - "h1:HMaN/L2hf1PN2YLdlQRbE49f4RF7VuqEVpqxNtJ2+18=", - "zh:1e2d65add4d63af5b396ae33d55c48303eca6c86bd1be0f6fae13267a9b47bc4", - "zh:20ddec3dac3d06a188f12e58b6428854949b1295e937c5d4dca4866dc1c937af", - "zh:35b72de4e6a3e3d69efc07184fb413406262fe447b2d82d57eaf8c787a068a06", - "zh:44eada24a50cd869aadc4b29f9e791fdf262d7f426921e9ac2893bbb86013176", - "zh:455e666e3a9a2312b3b9f434b87a404b6515d64a8853751e20566a6548f9df9e", - "zh:58b3ae74abfca7b9b61f42f0c8b10d97f9b01aff18bd1d4ab091129c9d203707", - "zh:840a8a32d5923f9e7422f9c80d165c3f89bb6ea370b8283095081e39050a8ea8", - "zh:87cb6dbbdbc1b73bdde4b8b5d6d780914a3e8f1df0385da4ea7323dc1a68468f", - "zh:8b8953e39b0e6e6156c5570d1ca653450bfa0d9b280e2475f01ee5c51a6554db", + "h1:0R7P7/ezHdqLHRsBoIA+jfI8f73mah7r41T9Xgp2bpw=", + "zh:008b605b7b6dcde4eb86759f54a36db731f94649f780738c6918ef3826eb064f", + "zh:08c1dd9a2b4b0d45356fc2124ac292aa549aab9053e33e240dd322700082c132", + "zh:0fa102804fc3903a598b631a791c40fd285162738c2939e92980078bb5c58bf8", + "zh:217f19d86f51e89ef479aa6b08ad3205c9ffe1d60422bbe10b373232658c56c2", + "zh:5ebf88b696c15dcd5e9a8ec3e7c58ecc6c1939bc75b72710bb8454c8a59dabce", + "zh:77da434b802735cdac2c5f4cd28b18a8221de4ec443019d4e17beab0aa064b09", + "zh:7a3cdb0f3dbc0cc6e50e3e719c48513d73a23acc154c2a6fa3a501cc86f02831", + "zh:878dc6b3c5d3068f439f1617051f3d2da9b899741fcc66d98a46a8bacf4fb320", + "zh:940ead03bdf6401ed921b71a6e14edbb613fd1f0eefc41bf555bc3d499cc604e", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:9bd750262e2fb0187a8420a561e55b0a1da738f690f53f5c7df170cb1f380459", - "zh:9d2474c1432dfa5e1db197e2dd6cd61a6a15452e0bc7acd09ca86b3cdb228871", - "zh:b763ecaf471c7737a5c6e4cf257b5318e922a6610fd83b36ed8eb68582a8642e", - "zh:c1344cd8fe03ff7433a19b14b14a1898c2ca5ba22a468fb8e1687f0a7f564d52", - "zh:dc0e0abf3be7402d0d022ced82816884356115ed27646df9c7222609e96840e6", + "zh:a3b496cf3a537a1b74e1433c7a4c5b19d51ed7c094c640dd240e474886b8c1de", + "zh:baac56fafa9d4aa6102554c9c6ca340512c18a31bf0c9899f7e0e823bb18a32a", + "zh:e1560da6a1cb052f719199f20f0238d4fab606f54f3ddad1b09ad390ab5c4a46", + "zh:e3fb0ad64e1812f4560396c2660e729c760ecb593f3fd1b0d76101d6923e8230", + "zh:fdc5159df807242e884b108746ac4ddf9725b7ce9f425785d4af465845de280e", ] } diff --git a/examples/terraform/aws-simple/terraform.tfvars.template b/examples/terraform/aws-simple/terraform.tfvars.template deleted file mode 100644 index cec68f93..00000000 --- a/examples/terraform/aws-simple/terraform.tfvars.template +++ /dev/null @@ -1,68 +0,0 @@ -// used to name infrastructure (CHANGE THIS) -name = "mcc-smoke-test" - -aws = { - region = "us-east-1" -} - -launchpad = { - drain = false - - mcr_version = "23.0.15" - mke_version = "3.7.15" - msr_version = "" - - mke_connect = { - username = "admin" - password = "" // an MKE passwords must be provided - insecure = false - } -} - -// configure the network stack -network = { - cidr = "172.31.0.0/16" -} -subnets = { - "Main" = { - cidr = "172.31.0.0/17" - nodegroups = ["ACon", "AWrk_Ubu22", "AWrk_Roc9", "AWrk_Win2022"] - private = false - } -} - - -// machine node groups by role & platform -nodegroups = { - "ACon" = { // managers for A group - role = "manager" - platform = "ubuntu_22.04" - count = 1 - type = "m6a.2xlarge" - }, - "AWrk_Ubu22" = { // workers for A group - role = "worker" - platform = "ubuntu_22.04" - count = 1 - type = "c6a.xlarge" - volume_size = 100 - }, - "AWrk_Roc9" = { // workers for A group - role = "worker" - platform = "rocky_9" - count = 1 - type = "c6a.xlarge" - volume_size = 100 - }, - // "AWrk_Win2022" = { - // role = "worker" - // platform = "windows_core_2022" - // count = 1 - // type = "c6a.xlarge" - // }, -} - -// set a windows password, if you have windows nodes -// windows passwords must match a pattern, or connections will fail. -// use something like: `testp@ss!` -# windows_password = "" diff --git a/go.mod b/go.mod index 85a2757f..71607a97 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/creasty/defaults v1.8.0 github.com/denisbrodbeck/machineid v1.0.1 github.com/gammazero/workerpool v1.1.3 - github.com/go-playground/validator/v10 v10.22.1 + github.com/go-playground/validator/v10 v10.23.0 github.com/gruntwork-io/terratest v0.46.11 github.com/hashicorp/go-version v1.7.0 github.com/k0sproject/dig v0.3.1 @@ -83,8 +83,8 @@ require ( github.com/fatih/color v1.13.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.6 // indirect - github.com/gammazero/deque v0.2.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.7 // indirect + github.com/gammazero/deque v1.0.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -196,13 +196,13 @@ require ( go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect - golang.org/x/crypto v0.29.0 // indirect - golang.org/x/net v0.31.0 // indirect + golang.org/x/crypto v0.30.0 // indirect + golang.org/x/net v0.32.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/term v0.26.0 // indirect - golang.org/x/text v0.20.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.6.0 // indirect google.golang.org/api v0.169.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect diff --git a/go.sum b/go.sum index f777deb4..d9ccffba 100644 --- a/go.sum +++ b/go.sum @@ -362,10 +362,10 @@ github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3 github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc= -github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc= -github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0= -github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= +github.com/gabriel-vasile/mimetype v1.4.7 h1:SKFKl7kD0RiPdbht0s7hFtjl489WcQ1VyPW8ZzUMYCA= +github.com/gabriel-vasile/mimetype v1.4.7/go.mod h1:GDlAgAyIRT27BhFl53XNAFtfjzOkLaF35JdEG0P7LtU= +github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34= +github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo= github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -398,8 +398,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA= -github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-playground/validator/v10 v10.23.0 h1:/PwmTwZhS0dPkav3cdK9kV1FsAmrL8sThn8IHr/sO+o= +github.com/go-playground/validator/v10 v10.23.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -936,8 +936,8 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1029,8 +1029,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1072,8 +1072,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1148,16 +1148,16 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= -golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1169,8 +1169,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/test/integration/integration_test.go b/test/integration/integration_test.go index c17a32ce..cf438c58 100644 --- a/test/integration/integration_test.go +++ b/test/integration/integration_test.go @@ -34,47 +34,26 @@ var LAUNCHPAD = map[string]interface{}{ "mke_connect": MKE_CONNECT, } -// configure the network stack -var NETWORK = map[string]interface{}{ - "cidr": "172.31.0.0/16", -} -var SUBNETS = map[string]interface{}{ - "main": map[string]interface{}{ - "cidr": "172.31.0.0/17", - "private": false, - "nodegroups": []string{"MngrUbuntu22", "WrkRhel9"}, - }, -} - // TestMain function to control the test execution func TestMain(m *testing.M) { t := &testing.T{} - // Create a temporary directory to store Terraform files - tempSSHKeyPathDir := t.TempDir() - log.Println("TestMKEClientConfig") - nodegroups := map[string]interface{}{ - "MngrUbuntu22": test.Platforms["Ubuntu22"].GetManager(), - "WrkRhel9": test.Platforms["Ubuntu22"].GetWorker(), - } - - uTestId := test.GenerateRandomAlphaNumericString(5) - - name := fmt.Sprintf("smoke-%s", uTestId) + name := fmt.Sprintf("integration-%s", test.GenerateRandomAlphaNumericString(5)) MKE_CONNECT["password"] = test.GenerateRandomAlphaNumericString(12) + // Create a temporary directory to store Terraform files + tempSSHKeyPathDir := t.TempDir() + options := terraform.Options{ // The path to where the Terraform tf chart is located TerraformDir: "../../examples/terraform/aws-simple", + VarFiles: []string{"smoke-small.tfvars"}, Vars: map[string]interface{}{ "name": name, "aws": AWS, "launchpad": LAUNCHPAD, - "network": NETWORK, - "subnets": SUBNETS, "ssh_pk_location": tempSSHKeyPathDir, - "nodegroups": nodegroups, }, } @@ -95,6 +74,8 @@ func TestMain(m *testing.M) { os.Exit(code) } +// Tests below will run in the scope of the above TestMain cluster + func TestMKEClientConfig(t *testing.T) { sp := test.GetInstance() product := sp.Product diff --git a/test/smoke/smoke_test.go b/test/smoke/smoke_test.go index f38eff33..8e40c1fc 100644 --- a/test/smoke/smoke_test.go +++ b/test/smoke/smoke_test.go @@ -24,40 +24,18 @@ var MKE_CONNECT = map[string]interface{}{ var LAUNCHPAD = map[string]interface{}{ "drain": false, - "mcr_version": "23.0.14", - "mke_version": "3.7.14", + "mcr_version": "23.0.15", + "mke_version": "3.7.15", "msr_version": "2.9.16", "mke_connect": MKE_CONNECT, } -// configure the network stack -var NETWORK = map[string]interface{}{ - "cidr": "172.31.0.0/16", -} -var SUBNETS = map[string]interface{}{ - "main": map[string]interface{}{ - "cidr": "172.31.0.0/17", - "private": false, - "nodegroups": []string{"MngrUbuntu22", "MngrUbuntu20", "MngrRocky9", "MngrRocky8", "MngrSles15", "MngrRhel9", "MngrRhel8", "WrkUbuntu22", "WrkUbuntu20", "WrkRocky9", "WrkRocky8", "WrkSles15", "WrkRhel9", "WrkRhel8"}, - }, -} - // TestSmallCluster deploys a small test cluster func TestSmallCluster(t *testing.T) { log.Println("TestSmallCluster") - nodegroups := map[string]interface{}{ - "MngrUbuntu22": test.Platforms["Ubuntu22"].GetManager(), - "WrkUbuntu22": test.Platforms["Ubuntu22"].GetWorker(), - } - - uTestId := test.GenerateRandomAlphaNumericString(5) - - name := fmt.Sprintf("smoke-%s", uTestId) - - rndPassword := test.GenerateRandomAlphaNumericString(12) - - MKE_CONNECT["password"] = rndPassword + name := fmt.Sprintf("smoke-%s", test.GenerateRandomAlphaNumericString(5)) + MKE_CONNECT["password"] = test.GenerateRandomAlphaNumericString(12) // Create a temporary directory to store Terraform files tempSSHKeyPathDir := t.TempDir() @@ -65,14 +43,12 @@ func TestSmallCluster(t *testing.T) { options := terraform.Options{ // The path to where the Terraform tf chart is located TerraformDir: "../../examples/terraform/aws-simple", + VarFiles: []string{"smoke-small.tfvars"}, Vars: map[string]interface{}{ "name": name, "aws": AWS, "launchpad": LAUNCHPAD, - "network": NETWORK, - "subnets": SUBNETS, "ssh_pk_location": tempSSHKeyPathDir, - "nodegroups": nodegroups, }, } @@ -102,31 +78,8 @@ func TestSmallCluster(t *testing.T) { func TestSupportedMatrixCluster(t *testing.T) { log.Println("TestSupportedMatrixCluster") - nodegroups := map[string]interface{}{ - "MngrUbuntu22": test.Platforms["Ubuntu22"].GetManager(), - "MngrUbuntu20": test.Platforms["Ubuntu20"].GetManager(), - "MngrRocky9": test.Platforms["Rocky9"].GetManager(), - //"MngrRocky8": test.Platforms["Rocky8"].GetManager(), - "MngrRhel9": test.Platforms["Rhel9"].GetManager(), - //"MngrRhel8": test.Platforms["Rhel8"].GetManager(), - "MngrSles15": test.Platforms["Sles15"].GetManager(), - - "WrkUbuntu22": test.Platforms["Ubuntu22"].GetWorker(), - "WrkUbuntu20": test.Platforms["Ubuntu20"].GetWorker(), - "WrkRocky9": test.Platforms["Rocky9"].GetWorker(), - //"WrkRocky8": test.Platforms["Rocky8"].GetWorker(), - "WrkRhel9": test.Platforms["Rhel9"].GetWorker(), - //"WrkRhel8": test.Platforms["Rhel8"].GetWorker(), - "WrkSles15": test.Platforms["Sles15"].GetWorker(), - } - - uTestId := test.GenerateRandomAlphaNumericString(5) - - name := fmt.Sprintf("smoke-%s", uTestId) - - rndPassword := test.GenerateRandomAlphaNumericString(12) - - MKE_CONNECT["password"] = rndPassword + name := fmt.Sprintf("smoke-%s", test.GenerateRandomAlphaNumericString(5)) + MKE_CONNECT["password"] = test.GenerateRandomAlphaNumericString(12) // Create a temporary directory to store Terraform files tempSSHKeyPathDir := t.TempDir() @@ -134,14 +87,12 @@ func TestSupportedMatrixCluster(t *testing.T) { options := terraform.Options{ // The path to where the Terraform tf chart is located TerraformDir: "../../examples/terraform/aws-simple", + VarFiles: []string{"smoke-full.tfvars"}, Vars: map[string]interface{}{ "name": name, "aws": AWS, "launchpad": LAUNCHPAD, - "network": NETWORK, - "subnets": SUBNETS, "ssh_pk_location": tempSSHKeyPathDir, - "nodegroups": nodegroups, }, } @@ -164,8 +115,8 @@ func TestSupportedMatrixCluster(t *testing.T) { assert.NoError(t, err) // Replace the version values for MCR,MKE,MSR in the mkeClusterConfig - mkeClusterConfig = strings.ReplaceAll(mkeClusterConfig, LAUNCHPAD["mcr_version"].(string), "23.0.15") - mkeClusterConfig = strings.ReplaceAll(mkeClusterConfig, LAUNCHPAD["mke_version"].(string), "3.7.15") + mkeClusterConfig = strings.ReplaceAll(mkeClusterConfig, LAUNCHPAD["mcr_version"].(string), "23.0.16") + mkeClusterConfig = strings.ReplaceAll(mkeClusterConfig, LAUNCHPAD["mke_version"].(string), "3.7.16") productUpgrade, err := config.ProductFromYAML([]byte(mkeClusterConfig)) assert.NoError(t, err)