changes to metadata
This commit is contained in:
parent
6e021788e1
commit
9f8f9f8b87
7 changed files with 74 additions and 10 deletions
|
|
@ -3,10 +3,10 @@ test: ./runtest.sh
|
|||
framework: beakerlib
|
||||
description: |
|
||||
Test ensures that users of various priviliges can access global module.
|
||||
duration: 5m
|
||||
recommend:
|
||||
require:
|
||||
tier: '1'
|
||||
- nodejs
|
||||
- npm
|
||||
tier: 'integration'
|
||||
component:
|
||||
- npm
|
||||
- nodejs
|
||||
|
|
|
|||
15
Integration/run-express-server/main.fmf
Normal file
15
Integration/run-express-server/main.fmf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
summary: Basic express server test
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
description: |
|
||||
Test ensures that node and npm can install and run express server.
|
||||
duration: 10m
|
||||
require:
|
||||
- nodejs
|
||||
- type: file
|
||||
pattern:
|
||||
- /server.js
|
||||
tier: smoke
|
||||
component:
|
||||
- npm
|
||||
- nodejs
|
||||
29
Integration/run-express-server/runtest.sh
Executable file
29
Integration/run-express-server/runtest.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
rlRun "mv server.js $tmp" 0
|
||||
rlRun "pushd $tmp"
|
||||
rlPhaseEnd
|
||||
|
||||
#Test installation and usage of expo
|
||||
rlPhaseStartTest
|
||||
rlShowPackageVersion nodejs
|
||||
rlShowPackageVersion npm
|
||||
rlRun "npm init -y"
|
||||
rlRun "npm install express" 0
|
||||
rlRun "nohup node server.js &> server.log &" 0
|
||||
rlRun "sleep 10" 0
|
||||
rlRun "curl http://localhost:55555" 0 "Trying to access server"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlLogInfo "Deleting files created by npm install"
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalEnd
|
||||
|
||||
20
Integration/run-express-server/server.js
Normal file
20
Integration/run-express-server/server.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
const express = require('express');
|
||||
|
||||
const app = express();
|
||||
const PORT = 55555;
|
||||
|
||||
// Middleware example: Log request details
|
||||
app.use((req, res, next) => {
|
||||
console.log(`${req.method} ${req.url}`);
|
||||
next();
|
||||
});
|
||||
|
||||
// Example route
|
||||
app.get('/', (req, res) => {
|
||||
res.send('Welcome to the Express server on port 55555!');
|
||||
});
|
||||
|
||||
// Start the server
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server is running on http://localhost:${PORT}`);
|
||||
});
|
||||
|
|
@ -3,9 +3,9 @@ test: ./runtest.sh
|
|||
framework: beakerlib
|
||||
description: |
|
||||
Test ensures that npm has the ability to install modules through various means.
|
||||
duration: 5m
|
||||
recommend:
|
||||
require:
|
||||
- npm
|
||||
- nodejs
|
||||
tier: '1'
|
||||
component:
|
||||
- npm
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ test: ./runtest.sh
|
|||
framework: beakerlib
|
||||
description: |
|
||||
Test ensures that NPM implementation can pass upstream test suite.
|
||||
duration: 5m
|
||||
recommend:
|
||||
require:
|
||||
- git
|
||||
tier: '1'
|
||||
- git
|
||||
- nodejs
|
||||
- npm
|
||||
tier: 'smoke'
|
||||
component:
|
||||
- npm
|
||||
- nodejs
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ discover:
|
|||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
# Will be overwritten by CI
|
||||
environment:
|
||||
KOJI_BUILD_ID: 123
|
||||
provision:
|
||||
|
|
@ -12,7 +13,6 @@ prepare:
|
|||
- name: Install test deps
|
||||
how: install
|
||||
package:
|
||||
- beakerlib
|
||||
- koji
|
||||
- libuv
|
||||
- cpio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue