-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NC | Online Upgrade | RPM spec changes
Signed-off-by: Romy <[email protected]>
- Loading branch information
Showing
2 changed files
with
55 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Copyright (C) 2016 NooBaa */ | ||
'use strict'; | ||
|
||
const mocha = require('mocha'); | ||
const os_utils = require('../../util/os_utils'); | ||
|
||
mocha.describe('rpm install tests', function() { | ||
mocha.it(async () => { | ||
const make_rpm_command = `sudo make rpm BUILD_S3SELECT=0`; | ||
await exec(make_rpm_command); | ||
const get_noobaa_rpm_path_command = `noobaa_pkg=$(ls ./build/rpm/ | grep noobaa | grep .x86_64.rpm)`; | ||
await exec(get_noobaa_rpm_path_command); | ||
const install_boost_deps = `sudo apt-get update && sudo apt-get install -y libboost-system-dev libboost-thread-dev`; | ||
await exec(install_boost_deps); | ||
const install_rpm_command = `rpm -i "./build/rpm/$noobaa_pkg"`; | ||
await exec(install_rpm_command); | ||
}); | ||
}); | ||
|
||
async function exec(command) { | ||
try { | ||
const res = await os_utils.exec(command, { | ||
return_stdout: true | ||
}); | ||
return res; | ||
} catch (err) { | ||
console.error('test_rpm_install.error', err); | ||
throw err; | ||
} | ||
} |