pull/49/head
Hunter Long 2018-08-19 02:16:15 -07:00
parent ed2db1a1eb
commit 3c2df53a7f
4 changed files with 23 additions and 39 deletions

3
.gitignore vendored
View File

@ -18,4 +18,5 @@ dev/test/node_modules
dev/test/cypress/videos
dev/test/cypress/screenshots
dev/test/app
source/rice-box.go
source/rice-box.go
sass

View File

@ -77,6 +77,9 @@ docker-push-dev: docker-base docker-dev docker-test
docker push hunterlong/statup:base
docker push hunterlong/statup:test
docker-push-latest: docker
docker push hunterlong/statup:latest
docker-run-dev: docker-dev
docker run -t -p 8080:8080 hunterlong/statup:dev
@ -94,9 +97,6 @@ docker-base: clean
docker-build-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:
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

View File

@ -17,6 +17,7 @@ package core
import (
"github.com/hunterlong/statup/source"
"github.com/hunterlong/statup/types"
"github.com/hunterlong/statup/utils"
"github.com/stretchr/testify/assert"
"testing"
@ -41,11 +42,11 @@ func TestNewCore(t *testing.T) {
}
func TestDbConfig_Save(t *testing.T) {
testConfig = &DbConfig{
testConfig = &DbConfig{DbConfig: &types.DbConfig{
DbConn: "sqlite",
Project: "Tester",
Location: dir,
}
}}
err := testConfig.Save()
assert.Nil(t, err)
}

View File

@ -1,41 +1,23 @@
FROM hunterlong/statup:dev
FROM golang:1.10.3-alpine
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 echo "force new chrome here"
RUN curl -L -s https://assets.statup.io/sass -o /usr/local/bin/sass && \
chmod +x /usr/local/bin/sass
# install Chromebrowser
RUN \
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/*
WORKDIR /go/src/github.com/hunterlong/statup
ADD . /go/src/github.com/hunterlong/statup
# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
ENV VERSION=$(VERSION)
ENV IS_DOCKER=true
# Add zip utility - it comes in very handy
RUN apt-get update && apt-get install -y zip
RUN make dev-deps
RUN make install
# versions of local tools
RUN node -v
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
EXPOSE 8080
ENTRYPOINT make test