Exemplo n.º 1
0
        public void IngressIsSetCorrectly()
        {
            var input = @"
ingress:
  - name: ingress
    bindings:
      - port: 8080
        protocol: http
        name: foo
    rules:
      - path: /A
        service: appA
      - path: /B
        service: appB
      - host: a.example.com
        service: appA
      - host: b.example.com
        service: appB
    replicas: 2";

            using var parser = new YamlParser(input);
            var actual = parser.ParseConfigApplication();

            var expected = _deserializer.Deserialize <ConfigApplication>(new StringReader(input));

            TyeAssert.Equal(expected, actual);
        }
Exemplo n.º 2
0
        public void ServicesSetCorrectly()
        {
            var input = @"
services:
  - name: appA
    project: ApplicationA/ApplicationA.csproj
    replicas: 2
    tags:
      - A
      - B
    external: false
    image: abc
    build: false
    executable: test.exe
    workingDirectory: ApplicationA/
    args: a b c
    env:
    - name: POSTGRES_PASSWORD
      value: ""test""
    - name: POSTGRES_PASSWORD2
      value: ""test2""
    volumes:
    - name: volume
      source: /data
      target: /data
    bindings:
    - name: test
      port: 4444
      connectionString: asdf
      containerPort: 80
      host: localhost
      protocol: http
      routes:
      - /swagger
      - /graphql
  - name: appB
    project: ApplicationB/ApplicationB.csproj
    replicas: 2
    tags:
      - tC
      - tD";

            using var parser = new YamlParser(input);
            var actual = parser.ParseConfigApplication();

            var expected = _deserializer.Deserialize <ConfigApplication>(new StringReader(input));

            TyeAssert.Equal(expected, actual);
        }
Exemplo n.º 3
0
        public void Services_Tags_SetCorrectly()
        {
            var input = @"
services:
  - name: ingress
    tags:
      - tagA
      - with space
      - ""C.X""
";

            using var parser = new YamlParser(input);
            var actual = parser.ParseConfigApplication();

            var expected = _deserializer.Deserialize <ConfigApplication>(new StringReader(input));

            TyeAssert.Equal(expected, actual);
        }