Skip to content

Commit

Permalink
fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Mar 6, 2024
1 parent eb02906 commit cd91319
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.12-bullseye

ENV PYTHONUNBUFFERED 1
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
},
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8900,
8529
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip install --upgrade pip poetry nox nox-poetry"
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
26 changes: 26 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3.8'

services:
app:
build:
context: .
dockerfile: Dockerfile

volumes:
- ../..:/workspaces:cached
- ${HOME}/.ssh:/home/vscode/.ssh

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

resotocore:
image: somecr.io/someengineering/fixcore:4.0.0
network_mode: service:app
environment:
RESOTOCORE_ANALYTICS_OPT_OUT: true
RESOTOCORE_OVERRIDE: "resotocore.api.web_hosts=0.0.0.0"
arangodb:
image: arangodb:3.10.5
network_mode: service:app
environment:
ARANGO_NO_AUTH: 1
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
6 changes: 6 additions & 0 deletions tests/fixclient_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ async def core_ready() -> bool:
# chech that connection is possible
list(client.cli_execute("system info"))

# fix is the default name of the graph for many calls
# let's create it first
client.create_graph("fix")
client.update_model(foo_kinds)
# graphtest needs to have the model too.
client.create_graph(g)
client.update_model(foo_kinds, g)

yield client

Expand Down

0 comments on commit cd91319

Please sign in to comment.