mirror of https://github.com/statping/statping
dev
parent
ed2db1a1eb
commit
3c2df53a7f
|
@ -18,4 +18,5 @@ dev/test/node_modules
|
||||||
dev/test/cypress/videos
|
dev/test/cypress/videos
|
||||||
dev/test/cypress/screenshots
|
dev/test/cypress/screenshots
|
||||||
dev/test/app
|
dev/test/app
|
||||||
source/rice-box.go
|
source/rice-box.go
|
||||||
|
sass
|
6
Makefile
6
Makefile
|
@ -77,6 +77,9 @@ docker-push-dev: docker-base docker-dev docker-test
|
||||||
docker push hunterlong/statup:base
|
docker push hunterlong/statup:base
|
||||||
docker push hunterlong/statup:test
|
docker push hunterlong/statup:test
|
||||||
|
|
||||||
|
docker-push-latest: docker
|
||||||
|
docker push hunterlong/statup:latest
|
||||||
|
|
||||||
docker-run-dev: docker-dev
|
docker-run-dev: docker-dev
|
||||||
docker run -t -p 8080:8080 hunterlong/statup:dev
|
docker run -t -p 8080:8080 hunterlong/statup:dev
|
||||||
|
|
||||||
|
@ -94,9 +97,6 @@ docker-base: clean
|
||||||
docker-build-base:
|
docker-build-base:
|
||||||
docker build -t hunterlong/statup:base -f dev/Dockerfile-base .
|
docker build -t hunterlong/statup:base -f dev/Dockerfile-base .
|
||||||
|
|
||||||
docker-base-run: clean
|
|
||||||
docker run -t -p 8080:8080 hunterlong/statup:base
|
|
||||||
|
|
||||||
databases:
|
databases:
|
||||||
docker run --name statup_postgres -p 5432:5432 -e POSTGRES_PASSWORD=password123 -e POSTGRES_USER=root -e POSTGRES_DB=root -d postgres
|
docker run --name statup_postgres -p 5432:5432 -e POSTGRES_PASSWORD=password123 -e POSTGRES_USER=root -e POSTGRES_DB=root -d postgres
|
||||||
docker run --name statup_mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password123 -e MYSQL_DATABASE=root -d mysql
|
docker run --name statup_mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password123 -e MYSQL_DATABASE=root -d mysql
|
||||||
|
|
|
@ -17,6 +17,7 @@ package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hunterlong/statup/source"
|
"github.com/hunterlong/statup/source"
|
||||||
|
"github.com/hunterlong/statup/types"
|
||||||
"github.com/hunterlong/statup/utils"
|
"github.com/hunterlong/statup/utils"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -41,11 +42,11 @@ func TestNewCore(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDbConfig_Save(t *testing.T) {
|
func TestDbConfig_Save(t *testing.T) {
|
||||||
testConfig = &DbConfig{
|
testConfig = &DbConfig{DbConfig: &types.DbConfig{
|
||||||
DbConn: "sqlite",
|
DbConn: "sqlite",
|
||||||
Project: "Tester",
|
Project: "Tester",
|
||||||
Location: dir,
|
Location: dir,
|
||||||
}
|
}}
|
||||||
err := testConfig.Save()
|
err := testConfig.Save()
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +1,23 @@
|
||||||
FROM hunterlong/statup:dev
|
FROM golang:1.10.3-alpine
|
||||||
MAINTAINER "Hunter Long (https://github.com/hunterlong)"
|
MAINTAINER "Hunter Long (https://github.com/hunterlong)"
|
||||||
# Statup 'test' image for running Statup golang tests and crypress UI tests
|
# Statup 'test' image for running a full test using the production environment
|
||||||
|
|
||||||
RUN apk add --update nodejs nodejs-npm
|
RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl
|
||||||
|
|
||||||
USER root
|
RUN curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o /go/bin/dep && \
|
||||||
|
chmod +x /go/bin/dep
|
||||||
|
|
||||||
RUN node --version
|
RUN curl -L -s https://assets.statup.io/sass -o /usr/local/bin/sass && \
|
||||||
RUN echo "force new chrome here"
|
chmod +x /usr/local/bin/sass
|
||||||
|
|
||||||
# install Chromebrowser
|
WORKDIR /go/src/github.com/hunterlong/statup
|
||||||
RUN \
|
ADD . /go/src/github.com/hunterlong/statup
|
||||||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
|
||||||
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y dbus-x11 google-chrome-stable && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# "fake" dbus address to prevent errors
|
ENV VERSION=$(VERSION)
|
||||||
# https://github.com/SeleniumHQ/docker-selenium/issues/87
|
ENV IS_DOCKER=true
|
||||||
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
|
|
||||||
|
|
||||||
# Add zip utility - it comes in very handy
|
RUN make dev-deps
|
||||||
RUN apt-get update && apt-get install -y zip
|
RUN make install
|
||||||
|
|
||||||
# versions of local tools
|
EXPOSE 8080
|
||||||
RUN node -v
|
ENTRYPOINT make test
|
||||||
RUN npm -v
|
|
||||||
RUN yarn -v
|
|
||||||
RUN google-chrome --version
|
|
||||||
RUN zip --version
|
|
||||||
RUN git --version
|
|
||||||
|
|
||||||
# a few environment variables to make NPM installs easier
|
|
||||||
# good colors for most applications
|
|
||||||
ENV TERM xterm
|
|
||||||
# avoid million NPM install messages
|
|
||||||
ENV npm_config_loglevel warn
|
|
||||||
# allow installing when the main user is root
|
|
||||||
ENV npm_config_unsafe_perm true
|
|
Loading…
Reference in New Issue