mirror of https://github.com/pulumi/pulumi.git
258fb00bc2
The `bad-methods-2.json` test ensures there is an error when trying to use a function as a method twice. The schema looks like: ``` "methods": { "bar": "xyz:index:Foo/bar", "baz": "xyz:index:Foo/bar" } ``` And the expected error is: > function xyz:index:Foo/bar for method baz is already a method However, when the schema is unmarshalled into a map, the keys in the map are unordered (just as JSON keys in objects are unordered), so occaisonally we'd see an error mentioning method `bar` rather than `baz`: > function xyz:index:Foo/bar for method bar is already a method To address this, we'll fix the portion of the code that is generating the error to walk the map in a deterministic order, and we'll also return the list of methods in the same deterministic order as well. |
||
---|---|---|
.. | ||
docs_parser.go | ||
docs_renderer.go | ||
docs_test.go | ||
loader.go | ||
schema.go | ||
schema_test.go |