Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt integration tests for fresh zabbix installation #6

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a9b4c06
move functions in seperate files per function
danubie Oct 8, 2021
e521490
move files to private because not exported in psd1
danubie Oct 8, 2021
69f6568
load func from files
danubie Oct 8, 2021
f8e0a8f
tests 1 per func; Pester 5; linux paths
danubie Oct 8, 2021
37c6175
correct path of included private file
danubie Oct 8, 2021
a95249f
move e2etests>integration; Pester5 needs more work
danubie Oct 8, 2021
e1afc4c
add config for devcontainers f linux
danubie Oct 8, 2021
1c773ea
add basic general module test
danubie Oct 9, 2021
37d8833
I guess ReadableOp is internal only > move private
danubie Oct 9, 2021
3154e97
add missing exports in psd1
danubie Oct 9, 2021
09fd088
change version, add release note
danubie Oct 9, 2021
4d182de
init code in BeforeAll; not more use InModuleScope
danubie Oct 10, 2021
07c4ba3
Describe init code: wrap into BeforeAll
danubie Oct 10, 2021
3d8004d
format indent
danubie Oct 10, 2021
e134257
fix invalid brackets
danubie Oct 10, 2021
5bd33b8
integr. test imports .psd1
danubie Oct 10, 2021
1fb8f84
Apply Pester 5 Syntax on Should -[Not|Be|...]
danubie Oct 10, 2021
0de8e46
check -devcontainer environment
danubie Oct 10, 2021
37f92db
fix acc. renamed parameter names
danubie Oct 10, 2021
fa4eb5d
replace fix templateId by first default template
danubie Oct 14, 2021
8a66d61
fix: on silentlycontinue and create fails
danubie Oct 14, 2021
578b911
fix bug when using multiple Ids
danubie Oct 14, 2021
831e238
make check consistent if running standalone
danubie Oct 14, 2021
ef5e7b2
Get-ZbxUser: enhance checks for reliability
danubie Oct 14, 2021
22e07a2
fix array params
danubie Oct 16, 2021
1c73979
add doker compose samples f. Zabbix V4&5
danubie Oct 16, 2021
492e22c
add test for unknown param values
danubie Oct 16, 2021
af2ae31
reliable test when running standalone; add cleanup
danubie Oct 16, 2021
f7bc611
fix var as hashtable
danubie Oct 17, 2021
88b4452
fix Ids as array
danubie Oct 17, 2021
ad4264f
fix implicit media type if no email is given
danubie Oct 17, 2021
bfc915c
improve remove-user tests
danubie Oct 17, 2021
27ce8dd
fix param array
danubie Oct 17, 2021
7435250
fix array params
danubie Oct 17, 2021
b7761eb
fix array params
danubie Oct 17, 2021
d48cc96
Get does not throw, it returns $null
danubie Oct 17, 2021
03e987f
fix parameter name
danubie Oct 17, 2021
73066e7
fix array param
danubie Oct 17, 2021
e815299
fix array param
danubie Oct 17, 2021
e3da16b
fix test results
danubie Oct 17, 2021
7ea14c5
devcontainer definition for Zabbix 3 tests
danubie Oct 17, 2021
c4d9e7d
cleanup groups
danubie Oct 17, 2021
b3abec4
chg -Throw to check for othing
danubie Oct 17, 2021
23f4d57
fix called function name
danubie Oct 17, 2021
bd721b9
fix array of hashtables (PS compatibility issue?)
danubie Oct 17, 2021
c88c18d
proböem $Host is a system variable
danubie Oct 17, 2021
460224b
add cleanup testdata
danubie Oct 17, 2021
72875ce
remove unused plugins
danubie Oct 17, 2021
b18cd7e
default config here is Zabbix 3.4
danubie Oct 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/docker-existing-docker-compose
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
{
"name": "Existing Docker Compose (Extend)",

// Update the 'dockerComposeFile' list if you have more compose files or use different names.
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
"dockerComposeFile": [
"../docker-compose.yml",
"docker-compose.yml"
],

// The 'service' property is the name of the service for the container that VS Code should
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
"service": "pszabbix",

// The optional 'workspaceFolder' property is the path VS Code should open by default when
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
"workspaceFolder": "/workspace",

// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.powershell",
]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],

// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",

// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",

// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
38 changes: 38 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: '3.9'
services:
# Update this to the name of the service you want to work with in your docker-compose.yml file
pszabbix:
# If you want add a non-root user to your Dockerfile, you can use the "remoteUser"
# property in devcontainer.json to cause VS Code its sub-processes (terminals, tasks,
# debugging) to execute as the user. Uncomment the next line if you want the entire
# container to run as this user instead. Note that, on Linux, you may need to
# ensure the UID and GID of the container user you create matches your local user.
# See https://aka.ms/vscode-remote/containers/non-root for details.
#
# user: vscode

# Uncomment if you want to override the service's Dockerfile to one in the .devcontainer
# folder. Note that the path of the Dockerfile and context is relative to the *primary*
# docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile"
# array). The sample below assumes your primary file is in the root of your project.
#
# build:
# context: .
# dockerfile: .devcontainer/Dockerfile

volumes:
# Update this to wherever you want VS Code to mount the folder of your project
- .:/workspace:cached

# Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker-compose for details.
# - /var/run/docker.sock:/var/run/docker.sock

# Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
# cap_add:
# - SYS_PTRACE
# security_opt:
# - seccomp:unconfined

# Overrides default command so things don't shut down after the process ends.
command: /bin/sh -c "while sleep 1000; do :; done"

3 changes: 3 additions & 0 deletions .devcontainer/pscoredev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/powershell:ubuntu-18.04
RUN pwsh -noprofile -noninteractive -c 'Install-Module PowershellGet -Scope AllUsers -Force'
RUN pwsh -noprofile -noninteractive -c 'Install-Module Pester,PSFramework -Scope AllUsers -Force'
Loading