git.iko.soy/typeable/bloodhound
on master help sign in
Fix overly broad generator for nodeattrname

We'll just use alphanum characters for node attr names

commit5dc0091c055c8383b74e38b7f5354a9c5f0941db authorMichael Xavier <michael@michaelxavier.net> dateSat 17 Sep 2016, 19:05 (10 years ago) parent8ccc4fc
1 file changed+2−1
tests/tests.hs+2−1
tests/tests.hs+2−1
@@ -768,7 +768,7 @@ instance Arbitrary ReplicaBounds where
768768 return (ReplicasLowerBounded a)
769769
770770instance Arbitrary NodeAttrName where
771− arbitrary = NodeAttrName . T.pack . getNonEmpty <$> arbitrary
771+ arbitrary = NodeAttrName . T.pack <$> listOf1 arbitraryAlphaNum
772772
773773
774774instance Arbitrary NodeAttrFilter where
@@ -777,6 +777,7 @@ instance Arbitrary NodeAttrFilter where
777777 s:ss <- listOf1 (listOf1 arbitraryAlphaNum)
778778 let ts = T.pack <$> s :| ss
779779 return (NodeAttrFilter n ts)
780+ shrink = genericShrink
780781
781782instance Arbitrary VersionNumber where
782783 arbitrary = mk . fmap getPositive . getNonEmpty <$> arbitrary