* Replace pkger with go:embed for bundling the admin. Closes #844 * Remove references to pkged.go * Point tests to use an updated version of Go * Add comment to new exported function * Cleanup * Add a dummy pkged.go to alert people to stop using it. * Add simple browser test to make sure the admin is available and renders * Don't panic
This commit is contained in:
@@ -18,7 +18,7 @@ fi
|
||||
pushd ../../.. > /dev/null
|
||||
|
||||
# Build and run owncast from source
|
||||
go build -o owncast main.go pkged.go
|
||||
go build -o owncast main.go
|
||||
./owncast -database $TEMP_DB &
|
||||
SERVER_PID=$!
|
||||
|
||||
|
||||
28
test/automated/browser/admin.test.js
Normal file
28
test/automated/browser/admin.test.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const listenForErrors = require('./lib/errors.js').listenForErrors;
|
||||
const ADMIN_USERNAME = 'admin';
|
||||
const ADMIN_PASSWORD = 'abc123';
|
||||
|
||||
describe('Video embed page', () => {
|
||||
beforeAll(async () => {
|
||||
await page.setViewport({ width: 1080, height: 720 });
|
||||
listenForErrors(browser, page);
|
||||
|
||||
// set HTTP Basic auth
|
||||
await page.authenticate({
|
||||
username: ADMIN_USERNAME,
|
||||
password: ADMIN_PASSWORD,
|
||||
});
|
||||
|
||||
await page.goto('http://localhost:5309/admin');
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await page.waitForTimeout(3000);
|
||||
await page.screenshot({ path: 'screenshots/admin.png', fullPage: true });
|
||||
});
|
||||
|
||||
it('should have rendered the admin home page', async () => {
|
||||
await page.waitForSelector('.home-container');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -18,7 +18,7 @@ fi
|
||||
pushd ../../.. > /dev/null
|
||||
|
||||
# Build and run owncast from source
|
||||
go build -o owncast main.go pkged.go
|
||||
go build -o owncast main.go
|
||||
BROWSER_TEST=true ./owncast -rtmpport 9021 -webserverport 5309 -database $TEMP_DB &
|
||||
SERVER_PID=$!
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ fi
|
||||
pushd ../../.. >/dev/null
|
||||
|
||||
# Build and run owncast from source
|
||||
go build -o owncast main.go pkged.go
|
||||
go build -o owncast main.go
|
||||
./owncast -database $TEMP_DB &
|
||||
SERVER_PID=$!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user