neiam /action-setup-beam
action-setup-beam
public · Issues · Pulls · Labels · Forks · Compare · Actions queued
⭐
Log in to mark this repository.
Remove input parameter that isn't one (in tests) (#290)
31b1b6d · Paulo F. Oliveira · 2024-06-22 16:08
Files changed
modified
test/setup-beam.test.js
+19
−25
@@ -181,21 +181,21 @@ async function testOTPVersions() {
| 181 | 181 | spec = '26' |
| 182 | 182 | osVersion = 'ubuntu-24.04' |
| 183 | 183 | expected = 'maint-26' |
| 184 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 184 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 185 | 185 | assert.deepStrictEqual(got, expected) |
| 186 | 186 | |
| 187 | 187 | simulateInput('version-type', before) |
| 188 | 188 | spec = '27.0' |
| 189 | 189 | osVersion = 'ubuntu-24.04' |
| 190 | 190 | expected = 'OTP-27.0' |
| 191 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 191 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 192 | 192 | assert.deepStrictEqual(got, expected) |
| 193 | 193 | |
| 194 | 194 | simulateInput('version-type', before) |
| 195 | 195 | spec = '25.3.2.1' |
| 196 | 196 | osVersion = 'ubuntu-20.04' |
| 197 | 197 | expected = 'OTP-25.3.2.1' |
| 198 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 198 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 199 | 199 | assert.deepStrictEqual(got, expected) |
| 200 | 200 | simulateInput('version-type', before) |
| 201 | 201 |
@@ -226,7 +226,7 @@ async function testOTPVersions() {
| 226 | 226 | spec = '20.3.8.26' |
| 227 | 227 | osVersion = 'ubuntu-20.04' |
| 228 | 228 | expected = 'OTP-20.3.8.26' |
| 229 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 229 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 230 | 230 | assert.deepStrictEqual(got, expected) |
| 231 | 231 | |
| 232 | 232 | spec = '20.x' |
@@ -250,13 +250,13 @@ async function testOTPVersions() {
| 250 | 250 | spec = 'maint' |
| 251 | 251 | osVersion = 'ubuntu-22.04' |
| 252 | 252 | expected = 'maint' |
| 253 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 253 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 254 | 254 | assert.deepStrictEqual(got, expected) |
| 255 | 255 | |
| 256 | 256 | spec = 'master' |
| 257 | 257 | osVersion = 'ubuntu-22.04' |
| 258 | 258 | expected = 'master' |
| 259 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 259 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 260 | 260 | assert.deepStrictEqual(got, expected) |
| 261 | 261 | |
| 262 | 262 | process.env.RUNNER_ARCH = previousRunnerArch |
@@ -306,21 +306,21 @@ async function testLinuxARM64OTPVersions() {
| 306 | 306 | spec = '26' |
| 307 | 307 | osVersion = 'ubuntu-24.04' |
| 308 | 308 | expected = 'maint-26' |
| 309 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 309 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 310 | 310 | assert.deepStrictEqual(got, expected) |
| 311 | 311 | |
| 312 | 312 | simulateInput('version-type', before) |
| 313 | 313 | spec = '27.0' |
| 314 | 314 | osVersion = 'ubuntu-24.04' |
| 315 | 315 | expected = 'OTP-27.0' |
| 316 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 316 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 317 | 317 | assert.deepStrictEqual(got, expected) |
| 318 | 318 | |
| 319 | 319 | simulateInput('version-type', before) |
| 320 | 320 | spec = '25.3.2.1' |
| 321 | 321 | osVersion = 'ubuntu-20.04' |
| 322 | 322 | expected = 'OTP-25.3.2.1' |
| 323 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 323 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 324 | 324 | assert.deepStrictEqual(got, expected) |
| 325 | 325 | simulateInput('version-type', before) |
| 326 | 326 |
@@ -333,7 +333,7 @@ async function testLinuxARM64OTPVersions() {
| 333 | 333 | spec = '20.3.8.26' |
| 334 | 334 | osVersion = 'ubuntu-20.04' |
| 335 | 335 | expected = 'OTP-20.3.8.26' |
| 336 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 336 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 337 | 337 | assert.deepStrictEqual(got, expected) |
| 338 | 338 | |
| 339 | 339 | spec = '20.x' |
@@ -357,13 +357,13 @@ async function testLinuxARM64OTPVersions() {
| 357 | 357 | spec = 'maint' |
| 358 | 358 | osVersion = 'ubuntu-22.04' |
| 359 | 359 | expected = 'maint' |
| 360 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 360 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 361 | 361 | assert.deepStrictEqual(got, expected) |
| 362 | 362 | |
| 363 | 363 | spec = 'master' |
| 364 | 364 | osVersion = 'ubuntu-22.04' |
| 365 | 365 | expected = 'master' |
| 366 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 366 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 367 | 367 | assert.deepStrictEqual(got, expected) |
| 368 | 368 | } |
| 369 | 369 |
@@ -391,21 +391,21 @@ async function testLinuxAMD64OTPVersions() {
| 391 | 391 | spec = '26' |
| 392 | 392 | osVersion = 'ubuntu-24.04' |
| 393 | 393 | expected = 'maint-26' |
| 394 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 394 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 395 | 395 | assert.deepStrictEqual(got, expected) |
| 396 | 396 | |
| 397 | 397 | simulateInput('version-type', before) |
| 398 | 398 | spec = '27.0' |
| 399 | 399 | osVersion = 'ubuntu-24.04' |
| 400 | 400 | expected = 'OTP-27.0' |
| 401 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 401 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 402 | 402 | assert.deepStrictEqual(got, expected) |
| 403 | 403 | |
| 404 | 404 | simulateInput('version-type', before) |
| 405 | 405 | spec = '25.3.2.1' |
| 406 | 406 | osVersion = 'ubuntu-20.04' |
| 407 | 407 | expected = 'OTP-25.3.2.1' |
| 408 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 408 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 409 | 409 | assert.deepStrictEqual(got, expected) |
| 410 | 410 | |
| 411 | 411 | simulateInput('version-type', before) |
@@ -436,7 +436,7 @@ async function testLinuxAMD64OTPVersions() {
| 436 | 436 | spec = '20.3.8.26' |
| 437 | 437 | osVersion = 'ubuntu-20.04' |
| 438 | 438 | expected = 'OTP-20.3.8.26' |
| 439 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 439 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 440 | 440 | assert.deepStrictEqual(got, expected) |
| 441 | 441 | |
| 442 | 442 | spec = '20.x' |
@@ -460,13 +460,13 @@ async function testLinuxAMD64OTPVersions() {
| 460 | 460 | spec = 'maint' |
| 461 | 461 | osVersion = 'ubuntu-22.04' |
| 462 | 462 | expected = 'maint' |
| 463 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 463 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 464 | 464 | assert.deepStrictEqual(got, expected) |
| 465 | 465 | |
| 466 | 466 | spec = 'master' |
| 467 | 467 | osVersion = 'ubuntu-22.04' |
| 468 | 468 | expected = 'master' |
| 469 | − got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 469 | + got = await setupBeam.getOTPVersion(spec, osVersion) | |
| 470 | 470 | assert.deepStrictEqual(got, expected) |
| 471 | 471 | } |
| 472 | 472 |
@@ -474,12 +474,6 @@ async function testLinuxAMD64OTPVersions() {
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | async function testFailGetOTPVersion() { |
| 477 | − const hexMirrors = simulateInput( | |
| 478 | − 'hexpm-mirrors', | |
| 479 | − 'https://repo.hex.pm, https://cdn.jsdelivr.net/hex', | |
| 480 | − { multiline: true }, | |
| 481 | − ) | |
| 482 | − | |
| 483 | 477 | const previousRunnerArch = process.env.RUNNER_ARCH |
| 484 | 478 | process.env.RUNNER_ARCH = 'invalid' |
| 485 | 479 |
@@ -489,7 +483,7 @@ async function testFailGetOTPVersion() {
| 489 | 483 | |
| 490 | 484 | assert.rejects( |
| 491 | 485 | async () => { |
| 492 | − await setupBeam.getOTPVersion(spec, osVersion, hexMirrors) | |
| 486 | + await setupBeam.getOTPVersion(spec, osVersion) | |
| 493 | 487 | }, |
| 494 | 488 | (err) => { |
| 495 | 489 | assert.ok(err instanceof Error) |
Parents: da545dd