https://github.com/orgs/community/discussions/16925
> [!NOTE]
> Highlights information that users should take into account, even when skimming.
> [!TIP]
> Optional information to help a user be more successful.
> [!IMPORTANT]
https://github.com/orgs/community/discussions/16925
> [!NOTE]
> Highlights information that users should take into account, even when skimming.
> [!TIP]
> Optional information to help a user be more successful.
> [!IMPORTANT]
root = true | |
[*] | |
indent_size = 2 | |
charset = utf-8 | |
end_of_line = lf | |
indent_style = tab | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
Specify and test one point of the contract of single method of a class. This should have a very narrow and well defined scope. Complex dependencies and interactions to the outside world are stubbed or mocked.
Test the correct inter-operation of multiple subsystems. There is whole spectrum there, from testing integration between two classes, to testing integration with the production environment.
// THIS IS THE REDESIGNED VERSION (see 3. middleware.go for my original approach) | |
package middleware | |
import ( | |
"net/http" | |
) | |
// Decorator is a middleware function. | |
type Decorator func(http.Handler) http.Handler |
Start with a Dockerfile:
FROM golang:latest
RUN apt-get update -y && apt-get install git -y
CMD ["/bin/bash"]
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
func main() { | |
var jsonBlob = []byte(`[ | |
{"str": "Foo", "num": "1", "bool": "true", "its": 3}, |
# Check that given variables are set and all have non-empty values, | |
# die with an error otherwise. | |
# | |
# PARAMS: | |
# 1. Variable name(s) to test. | |
# 2. (optional) Error message to print. | |
# | |
# EXAMPLE: | |
# @:$(call check_defined, ENV_REGION, you must set ENV_REGION=usc1|awsuse2) | |
# |
First install VirtualBox:
https://www.virtualbox.org/wiki/Testbuilds
Next download the Windows ISO:
https://www.microsoft.com/software-download/windows11
Watch this video which explains some of the VirtualBox setup:
https://www.youtube.com/watch?v=1BOcED3RFGM&t=1s
This directory contains a Compute application that proxies incoming requests onto https://http-me.glitch.me/.
There is a run.sh
script which will attempt to validate the