File tree 13 files changed +181
-3
lines changed
kubernetes-api-1.20/tests
kubernetes-api-1.21/tests
kubernetes-api-1.22/tests
kubernetes-api-1.23/tests
kubernetes-api-1.24/tests
kubernetes-api-1.25/tests
kubernetes-api-1.26/tests
kubernetes-api-1.27/tests
kubernetes-api-1.28/tests
kubernetes-api-1.29/tests
kubernetes-api-1.30/tests 13 files changed +181
-3
lines changed Original file line number Diff line number Diff line change 37
37
38
38
# Copy handwritten files
39
39
cp ${ ./handwritten/CustomTypes.hs } "$out/lib/Kubernetes/OpenAPI/CustomTypes.hs"
40
+ cp ${ ./handwritten/CustomInstances.hs } "$out/tests/CustomInstances.hs"
40
41
41
42
# Fill in the package version
42
43
${ pkgs . gnused } /bin/sed -i "s/^version:\s*\(.*\)/version: $PACKAGE_VERSION/" "$out/kubernetes-api.cabal"
55
56
packages:
56
57
- zlib
57
58
EOM
58
-
59
- # Remove unnecessary files
60
- git clean -fdx "$out"
61
59
'' ;
62
60
63
61
set-stack-version = pkgs . writeShellScriptBin "build-kubernetes-api-client.sh" ''
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
Original file line number Diff line number Diff line change
1
+ module CustomInstances where
2
+
3
+ import Kubernetes.OpenAPI.Model
4
+
5
+ import Test.QuickCheck
6
+ import Data.Text (pack )
7
+
8
+ instance Arbitrary IntOrString where
9
+ arbitrary =
10
+ oneof [ IntOrStringI <$> arbitrary
11
+ , IntOrStringS <$> (pack <$> arbitrary)
12
+ ]
13
+
14
+ instance Arbitrary Quantity where
15
+ arbitrary = Quantity <$> (pack <$> arbitrary)
You can’t perform that action at this time.
0 commit comments