Skip to content

Commit

Permalink
Update fixtures
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
  • Loading branch information
xmudrii authored and kubermatic-bot committed Apr 16, 2024
1 parent e49ff10 commit 1c5dc21
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 195 deletions.
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-force.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -71,10 +62,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -71,10 +62,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-proxy.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -71,10 +62,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-v1.26.0.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -71,10 +62,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-with_cilium.golden
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -77,10 +68,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmAmazonLinux-with_containerd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -71,10 +62,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -71,10 +62,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmCentOS-cilium_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -83,10 +74,11 @@ if [ "$ID" == "centos" ] && [ "$VERSION_ID" == "8" ]; then
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
fi

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmCentOS-nutanix_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -77,10 +68,11 @@ if [ "$ID" == "centos" ] && [ "$VERSION_ID" == "8" ]; then
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
fi

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestKubeadmCentOS-with_containerd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -77,10 +68,11 @@ if [ "$ID" == "centos" ] && [ "$VERSION_ID" == "8" ]; then
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
fi

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -77,10 +68,11 @@ if [ "$ID" == "centos" ] && [ "$VERSION_ID" == "8" ]; then
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
fi

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
18 changes: 5 additions & 13 deletions pkg/scripts/testdata/TestUpgradeKubeadmAndCNIAmazonLinux.golden
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf
sudo mv /tmp/yum.conf /etc/yum.conf


# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned
# repositories, otherwise, yum will fail to upgrade the packages because it's trying to
# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1).
repo_migration_needed=false

if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then
repo_migration_needed=true
fi

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
Expand All @@ -71,10 +62,11 @@ gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
EOF

if [[ $repo_migration_needed == "true" ]]; then
sudo yum clean all
sudo yum makecache
fi
# We must clean 'yum' cache upon changing the package repository
# because older 'yum' versions (e.g. CentOS and Amazon Linux 2)
# don't detect the change otherwise.
sudo yum clean all
sudo yum makecache


sudo yum install -y \
Expand Down
Loading

0 comments on commit 1c5dc21

Please sign in to comment.