commit
12bc46a7d2
@ -0,0 +1,20 @@
|
||||
services:
|
||||
|
||||
sonarqube-server:
|
||||
image: sonarqube:lts-community
|
||||
hostname: sonarqube
|
||||
container_name: sonarqube
|
||||
environment:
|
||||
SONAR_JDBC_URL: jdbc:postgresql://192.168.1.33:5433/sonar
|
||||
SONAR_JDBC_USERNAME: sonar
|
||||
SONAR_JDBC_PASSWORD: sonarpwd
|
||||
SONAR_SEARCH_JAVAADDITIONALOPTS: "-Dbootstrap.system_call_filter=false"
|
||||
volumes:
|
||||
- ./extensions:/opt/sonarqube/extensions
|
||||
- ./logs:/opt/sonarqube/logs
|
||||
ports:
|
||||
- "9000:9000"
|
||||
|
||||
networks:
|
||||
soanrqube-networks:
|
||||
driver: bridge
|
||||
@ -0,0 +1,21 @@
|
||||
services:
|
||||
|
||||
sonarqube-server:
|
||||
image: sonarqube:lts-community
|
||||
hostname: sonarqube
|
||||
container_name: sonarqube
|
||||
environment:
|
||||
SONAR_JDBC_URL: jdbc:postgresql://192.168.1.33:5433/sonar
|
||||
SONAR_JDBC_USERNAME: sonar
|
||||
SONAR_JDBC_PASSWORD: sonarpwd
|
||||
SONAR_SEARCH_JAVAADDITIONALOPTS: "-Dbootstrap.system_call_filter=false"
|
||||
volumes:
|
||||
- ./data:/opt/sonarqube/data
|
||||
- ./extensions:/opt/sonarqube/extensions
|
||||
- ./logs:/opt/sonarqube/logs
|
||||
ports:
|
||||
- "9000:9000"
|
||||
|
||||
networks:
|
||||
soanrqube-networks:
|
||||
driver: bridge
|
||||
@ -0,0 +1,23 @@
|
||||
services:
|
||||
|
||||
sonarqube-server:
|
||||
image: docker.io/bitnami/sonarqube:9
|
||||
hostname: sonarqube
|
||||
container_name: sonarqube
|
||||
environment:
|
||||
SONARQUBE_DATABASE_HOST: 192.168.1.33
|
||||
SONARQUBE_DATABASE_PORT_NUMBER: 5433
|
||||
SONARQUBE_DATABASE_USER: sonar
|
||||
SONARQUBE_DATABASE_NAME: sonar
|
||||
SONARQUBE_DATABASE_PASSWORD: sonarpwd
|
||||
SONAR_SEARCH_JAVAADDITIONALOPTS: "-Dbootstrap.system_call_filter=false"
|
||||
volumes:
|
||||
- ./data:/bitnami/sonarqube/data
|
||||
- ./extensions:/bitnami/sonarqube/extensions
|
||||
- ./logsé:/bitnami/sonarqube/logs
|
||||
ports:
|
||||
- "9000:9000"
|
||||
|
||||
networks:
|
||||
soanrqube-networks:
|
||||
driver: bridge
|
||||
@ -1,7 +0,0 @@
|
||||
/*
|
||||
* Replace this with your own classes
|
||||
*
|
||||
* e.g.
|
||||
* .container {
|
||||
* }
|
||||
*/
|
||||
@ -1,10 +0,0 @@
|
||||
import { render } from '@testing-library/react';
|
||||
|
||||
import HeaderAuth from './header-auth';
|
||||
|
||||
describe('HeaderAuth', () => {
|
||||
it('should render successfully', () => {
|
||||
const { baseElement } = render(<HeaderAuth />);
|
||||
expect(baseElement).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -1,28 +0,0 @@
|
||||
import styles from './header-auth.module.scss';
|
||||
import {useRouter} from "next/router";
|
||||
|
||||
export function HeaderAuth() {
|
||||
const router = useRouter();
|
||||
|
||||
const goBack = (event) => {
|
||||
router.back();
|
||||
}
|
||||
|
||||
return (
|
||||
<nav className="bg-white border-gray-200 px-2 sm:px-4 py-2.5 rounded dark:bg-gray-900">
|
||||
<div className="container flex flex-wrap items-center justify-between mx-auto">
|
||||
<div className="flex md:order-2">
|
||||
<button type="button"
|
||||
onClick={(event) => goBack(event)}
|
||||
className="py-2.5 px-5 mr-2 mb-2 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
|
||||
Retour au site
|
||||
</button>
|
||||
</div>
|
||||
<div className="items-center justify-between hidden w-full md:flex md:w-auto md:order-1"
|
||||
id="navbar-sticky"></div>
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
export default HeaderAuth;
|
||||
@ -1,10 +1,26 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import {render} from '@testing-library/react';
|
||||
import {SessionProvider, useSession} from "next-auth/react";
|
||||
|
||||
import Header from './header';
|
||||
|
||||
jest.mock("next-auth/react", () => {
|
||||
const originalModule = jest.requireActual('next-auth/react');
|
||||
const mockSession = {
|
||||
expires: new Date(Date.now() + 2 * 86400).toISOString(),
|
||||
user: { username: "admin" }
|
||||
};
|
||||
return {
|
||||
__esModule: true,
|
||||
...originalModule,
|
||||
useSession: jest.fn(() => {
|
||||
return {data: mockSession, status: 'authenticated'} // return type is [] in v3 but changed to {} in v4
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
describe('Header', () => {
|
||||
it('should render successfully', () => {
|
||||
const { baseElement } = render(<Header />);
|
||||
const {baseElement} = render(<Header/>);
|
||||
expect(baseElement).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import {render} from '@testing-library/react';
|
||||
|
||||
import Index from '../pages/index';
|
||||
|
||||
jest.mock("next-auth/react", () => {
|
||||
const originalModule = jest.requireActual('next-auth/react');
|
||||
const mockSession = {
|
||||
expires: new Date(Date.now() + 2 * 86400).toISOString(),
|
||||
user: {username: "admin"}
|
||||
};
|
||||
return {
|
||||
__esModule: true,
|
||||
...originalModule,
|
||||
useSession: jest.fn(() => {
|
||||
return {data: mockSession, status: 'authenticated'} // return type is [] in v3 but changed to {} in v4
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
describe('Index', () => {
|
||||
it('should render successfully', () => {
|
||||
const {baseElement} = render(<Index/>);
|
||||
expect(baseElement).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,8 @@
|
||||
sonar.projectKey=david:guitar-apps
|
||||
sonar.sources=./
|
||||
sonar.coverage.exclusions=.next/,.eslintrc.json,config.ts,index.d.ts,jest.config.ts,next.config.js,postcss.config.js,tailwind.config.js,with-nx.js
|
||||
sonar.language=ts
|
||||
sonar.tests=./
|
||||
sonar.javascript.lcov.reportPaths=../../coverage/apps/website/lcov.info
|
||||
sonar.testExecutionReportPaths=test-report.xml
|
||||
sonar.sourceEncoding=UTF-8
|
||||
@ -1,11 +0,0 @@
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
|
||||
import Index from '../pages/index';
|
||||
|
||||
describe('Index', () => {
|
||||
it('should render successfully', () => {
|
||||
const { baseElement } = render(<Index />);
|
||||
expect(baseElement).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Loading…
Reference in new issue