Skip to content

Commit

Permalink
test: unlock CABPT/CACPPT provider versions
Browse files Browse the repository at this point in the history
We should always test latest versions of our providers.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Feb 9, 2022
1 parent df0e388 commit 0da370d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 2 additions & 4 deletions hack/test/e2e-capi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set -eou pipefail
source ./hack/test/e2e.sh

export CAPI_VERSION="${CAPI_VERSION:-1.0.4}"
export CABPT_VERSION="${CABPT_VERSION:-0.5.0}"
export CACPPT_VERSION="${CACPPT_VERSION:-0.4.2}"
export CAPA_VERSION="${CAPA_VERSION:-1.2.0}"
export CAPG_VERSION="${CAPG_VERSION:-1.0.0}"

Expand All @@ -27,9 +25,9 @@ set -x

${CLUSTERCTL} init \
--core "cluster-api:v${CAPI_VERSION}" \
--control-plane "talos:v${CACPPT_VERSION}" \
--control-plane "talos" \
--infrastructure "aws:v${CAPA_VERSION},gcp:v${CAPG_VERSION}" \
--bootstrap "talos:v${CABPT_VERSION}"
--bootstrap "talos"

# Wait for the talosconfig
timeout=$(($(date +%s) + ${TIMEOUT}))
Expand Down
7 changes: 6 additions & 1 deletion internal/integration/api/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"context"
"fmt"
"io"
"strings"
"time"

"github.com/cosi-project/runtime/pkg/resource"
Expand Down Expand Up @@ -187,7 +188,11 @@ func (suite *DiscoverySuite) TestRegistries() {
rawAffiliate := rawAffiliatesByID[registry+member.TypedSpec().NodeID]
suite.Require().NotNil(rawAffiliate)

suite.Assert().Equal(member.TypedSpec().Hostname, rawAffiliate.TypedSpec().Hostname)
stripDomain := func(s string) string { return strings.Split(s, ".")[0] }

// registries can be a bit inconsistent, e.g. whether they report fqdn or just hostname
suite.Assert().Contains([]string{member.TypedSpec().Hostname, stripDomain(member.TypedSpec().Hostname)}, rawAffiliate.TypedSpec().Hostname)

suite.Assert().Equal(member.TypedSpec().Addresses, rawAffiliate.TypedSpec().Addresses)
suite.Assert().Equal(member.TypedSpec().OperatingSystem, rawAffiliate.TypedSpec().OperatingSystem)
suite.Assert().Equal(member.TypedSpec().MachineType, rawAffiliate.TypedSpec().MachineType)
Expand Down

0 comments on commit 0da370d

Please sign in to comment.