Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: using apt-get instead of apt #93

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
sudo lxd waitready
- name: Install and configure OVN
run: |
sudo apt update -y
sudo apt install ovn-host ovn-central -y
sudo apt-get update -y
sudo apt-get install ovn-host ovn-central -y
sudo ovs-vsctl set open_vswitch . \
external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock \
external_ids:ovn-encap-type=geneve \
Expand Down
8 changes: 4 additions & 4 deletions e2e/embed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func TestEmbedAndInstall(t *testing.T) {
defer tc.Destroy()
t.Log("installing ssh in node 0")
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, 0, commands); err != nil {
t.Fatalf("fail to install ssh on node %s: %v", tc.Nodes[0], err)
Expand All @@ -45,8 +45,8 @@ func TestEmbedAddonsOnly(t *testing.T) {
defer tc.Destroy()
t.Log("installing ssh in node 0")
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, 0, commands); err != nil {
t.Fatalf("fail to install ssh on node %s: %v", tc.Nodes[0], err)
Expand Down
26 changes: 13 additions & 13 deletions e2e/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func TestTokenBasedMultiNodeInstallation(t *testing.T) {
defer tc.Destroy()
t.Log("installing ssh on node 0")
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, 0, commands); err != nil {
t.Fatalf("fail to install ssh on node %s: %v", tc.Nodes[0], err)
Expand Down Expand Up @@ -82,8 +82,8 @@ func TestSingleNodeInstallation(t *testing.T) {
defer tc.Destroy()
t.Log("installing ssh on node 0")
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, 0, commands); err != nil {
t.Fatalf("fail to install ssh on node %s: %v", tc.Nodes[0], err)
Expand All @@ -110,8 +110,8 @@ func TestMultiNodeInstallation(t *testing.T) {
for i := range tc.Nodes {
t.Logf("installing ssh on node %d", i)
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, i, commands); err != nil {
t.Fatalf("fail to install ssh on node %d: %v", i, err)
Expand Down Expand Up @@ -164,8 +164,8 @@ func TestSingleNodeInstallationDebian12(t *testing.T) {
defer tc.Destroy()
t.Log("installing ssh on node 0")
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, 0, commands); err != nil {
t.Fatalf("fail to install ssh on node 0: %v", err)
Expand Down Expand Up @@ -220,15 +220,15 @@ func TestMultiNodeInteractiveInstallation(t *testing.T) {
for i := range tc.Nodes {
t.Logf("installing ssh on node %d", i)
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, i, commands); err != nil {
t.Fatalf("fail to install ssh on node %d: %v", i, err)
}
}
t.Logf("installing expect on node 0")
line := []string{"apt", "install", "expect", "-y"}
line := []string{"apt-get", "install", "expect", "-y"}
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
t.Fatalf("fail to install expect on node 0: %v", err)
}
Expand Down Expand Up @@ -257,8 +257,8 @@ func TestInstallWithDisabledAddons(t *testing.T) {
defer tc.Destroy()
t.Log("installing ssh in node 0")
commands := [][]string{
{"apt", "update", "-y"},
{"apt", "install", "openssh-server", "-y"},
{"apt-get", "update", "-y"},
{"apt-get", "install", "openssh-server", "-y"},
}
if err := RunCommandsOnNode(t, tc, 0, commands); err != nil {
t.Fatalf("fail to install ssh on node %s: %v", tc.Nodes[0], err)
Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/addons-only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ wait_for_healthy_node() {
}

install_helm() {
apt update -y
if ! apt install -y curl ; then
apt-get update -y
if ! apt-get install -y curl ; then
return 1
fi
if ! curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 ; then
Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/embed-and-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ wait_for_healthy_node() {
}

install_helm() {
apt update -y
if ! apt install -y curl ; then
apt-get update -y
if ! apt-get install -y curl ; then
return 1
fi
if ! curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 ; then
Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/install-with-disabled-addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ wait_for_healthy_node() {
}

install_helm() {
apt update -y
if ! apt install -y curl ; then
apt-get update -y
if ! apt-get install -y curl ; then
return 1
fi
if ! curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 ; then
Expand Down