Skip to content

Commit

Permalink
Merge pull request #113617 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-22.2-113593

release-22.2: roachtest: fix javascript installation commands
  • Loading branch information
rafiss authored Nov 1, 2023
2 parents 5ebaa3f + 70e6787 commit 135acce
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
11 changes: 8 additions & 3 deletions pkg/cmd/roachtest/tests/knex.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,18 @@ func registerKnex(r registry.Registry) {
t,
c,
node,
"add nodesource repository",
`sudo apt install ca-certificates && curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -`,
"add nodesource key and deb repository",
`
sudo apt-get update && \
sudo apt-get install -y ca-certificates curl gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`,
)
require.NoError(t, err)

err = repeatRunE(
ctx, t, c, node, "install nodejs and npm", `sudo apt-get -qq install nodejs`,
ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`,
)
require.NoError(t, err)

Expand Down
11 changes: 8 additions & 3 deletions pkg/cmd/roachtest/tests/nodejs_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@ func registerNodeJSPostgres(r registry.Registry) {
t,
c,
node,
"add nodesource repository",
`sudo apt install ca-certificates && curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -`,
"add nodesource key and deb repository",
`
sudo apt-get update && \
sudo apt-get install -y ca-certificates curl gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`,
)
require.NoError(t, err)

err = repeatRunE(
ctx, t, c, node, "install nodejs and npm", `sudo apt-get -qq install nodejs`,
ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`,
)
require.NoError(t, err)

Expand Down
11 changes: 8 additions & 3 deletions pkg/cmd/roachtest/tests/sequelize.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,19 @@ func registerSequelize(r registry.Registry) {
t,
c,
node,
"add nodesource repository",
`sudo apt install ca-certificates && curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -`,
"add nodesource key and deb repository",
`
sudo apt-get update && \
sudo apt-get install -y ca-certificates curl gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`,
); err != nil {
t.Fatal(err)
}

if err := repeatRunE(
ctx, t, c, node, "install nodejs and npm", `sudo apt-get -qq install nodejs`,
ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`,
); err != nil {
t.Fatal(err)
}
Expand Down
11 changes: 8 additions & 3 deletions pkg/cmd/roachtest/tests/typeorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,19 @@ func registerTypeORM(r registry.Registry) {
t,
c,
node,
"add nodesource repository",
`sudo apt install ca-certificates && curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -`,
"add nodesource key and deb repository",
`
sudo apt-get update && \
sudo apt-get install -y ca-certificates curl gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list`,
); err != nil {
t.Fatal(err)
}

if err := repeatRunE(
ctx, t, c, node, "install nodejs and npm", `sudo apt-get install -y nodejs`,
ctx, t, c, node, "install nodejs and npm", `sudo apt-get update && sudo apt-get -qq install nodejs`,
); err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 135acce

Please sign in to comment.