mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1765: Use maven-frontend-plugin instead of jasmine-frontend-plugin to fix docker build.
This commit is contained in:
@@ -30,6 +30,9 @@ ARG TOMCAT_JRE=jdk8
|
||||
# Use official maven image for the build
|
||||
FROM maven:3-jdk-8 AS builder
|
||||
|
||||
# Install chromium browser for sake of JavaScript unit tests
|
||||
RUN apt-get update && apt-get install -y chromium
|
||||
|
||||
# Use args to build radius auth extension such as
|
||||
# `--build-arg BUILD_PROFILE=lgpl-extensions`
|
||||
ARG BUILD_PROFILE
|
||||
|
2
guacamole-common-js/.gitignore
vendored
2
guacamole-common-js/.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
node/*
|
||||
node_modules/*
|
||||
target/
|
||||
*~
|
||||
|
50
guacamole-common-js/karma-ci.conf.js
Normal file
50
guacamole-common-js/karma-ci.conf.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
// Discover and run jasmine tests
|
||||
frameworks: ['jasmine'],
|
||||
|
||||
// Pattern matching all javascript source and tests
|
||||
files: [
|
||||
'src/**/*.js'
|
||||
],
|
||||
|
||||
// Run the tests once and exit
|
||||
singleRun: true,
|
||||
|
||||
// Disable automatic test running on changed files
|
||||
autoWatch: false,
|
||||
|
||||
// Use a headless chromium browser to run the tests
|
||||
// --no-sandbox required when running in docker build - for more, see
|
||||
// https://github.com/karma-runner/karma-chrome-launcher/issues/158
|
||||
// TODON'T: THIS
|
||||
browsers: ['ChromiumHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromiumHeadlessNoSandbox: {
|
||||
base: 'ChromiumHeadless',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
2752
guacamole-common-js/package-lock.json
generated
Normal file
2752
guacamole-common-js/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
guacamole-common-js/package.json
Normal file
8
guacamole-common-js/package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Dependencies to be installed by maven for running JS tests",
|
||||
"devDependencies": {
|
||||
"karma": "^6.4.1",
|
||||
"karma-chrome-launcher": "^3.1.1",
|
||||
"karma-jasmine": "^5.1.0"
|
||||
}
|
||||
}
|
@@ -116,25 +116,51 @@
|
||||
|
||||
<!-- Unit test using Jasmin and PhantomJS -->
|
||||
<plugin>
|
||||
<groupId>com.github.searls</groupId>
|
||||
<artifactId>jasmine-maven-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
<version>1.12.1</version>
|
||||
|
||||
<configuration>
|
||||
|
||||
<!-- The version of node to use for running tests -->
|
||||
<nodeVersion>v16.19.1</nodeVersion>
|
||||
|
||||
<!-- Install dependencies with "npm ci" for repeatability -->
|
||||
<arguments>ci</arguments>
|
||||
|
||||
<!-- The location of the karma config file -->
|
||||
<karmaConfPath>karma-ci.conf.js</karmaConfPath>
|
||||
|
||||
</configuration>
|
||||
|
||||
<executions>
|
||||
|
||||
<!-- Install node.js and NPM before running tests -->
|
||||
<execution>
|
||||
<id>install node and npm</id>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
<goal>install-node-and-npm</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<!-- Install test dependencies -->
|
||||
<execution>
|
||||
<id>npm install</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<!-- Run all tests non-interactively -->
|
||||
<execution>
|
||||
<id>run tests</id>
|
||||
<goals>
|
||||
<goal>karma</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
</executions>
|
||||
<configuration>
|
||||
<phantomjs>
|
||||
<version>2.1.1</version>
|
||||
</phantomjs>
|
||||
<sourceIncludes>
|
||||
<sourceInclude>**/*.min.js</sourceInclude>
|
||||
</sourceIncludes>
|
||||
<jsSrcDir>${project.build.directory}/${project.build.finalName}</jsSrcDir>
|
||||
</configuration>
|
||||
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
Reference in New Issue
Block a user