Created
January 23, 2019 16:15
-
-
Save markfuller/8c10bda9df34fce200b3a5e8afa253f4 to your computer and use it in GitHub Desktop.
ExampleServer test output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running tool: /usr/local/bin/go test -timeout 30s github.com/lyraproj/lyra/cmd/goplugin-example/example -run ^(ExampleServer)$ -v -count=1 | |
=== RUN ExampleServer | |
--- FAIL: ExampleServer (0.00s) | |
got: | |
type Example = TypeSet[{ | |
pcore_uri => 'http://puppet.com/2016.1/pcore', | |
pcore_version => '1.0.0', | |
name_authority => 'http://puppet.com/2016.1/runtime', | |
name => 'Example', | |
version => '0.1.0', | |
types => { | |
Address => { | |
attributes => { | |
'line_one' => { | |
'type' => String, | |
'value' => '' | |
} | |
} | |
}, | |
ContainedRes => { | |
annotations => { | |
Lyra::Resource => { | |
'provided_attributes' => ['id'], | |
'relationships' => { | |
'owner' => { | |
'type' => OwnerRes, | |
'kind' => 'container', | |
'cardinality' => 'one', | |
'keys' => ['owner_id', 'id'] | |
} | |
} | |
} | |
}, | |
attributes => { | |
'id' => { | |
'type' => Optional[String], | |
'value' => undef | |
}, | |
'owner_id' => String, | |
'stuff' => String | |
} | |
}, | |
OwnerRes => { | |
annotations => { | |
Lyra::Resource => { | |
'provided_attributes' => ['id'], | |
'relationships' => { | |
'mine' => { | |
'type' => ContainedRes, | |
'kind' => 'contained', | |
'cardinality' => 'many', | |
'keys' => ['id', 'owner_id'] | |
} | |
} | |
} | |
}, | |
attributes => { | |
'id' => { | |
'type' => Optional[String], | |
'value' => undef | |
}, | |
'phone' => String | |
} | |
}, | |
Person => { | |
attributes => { | |
'name' => { | |
'type' => String, | |
'value' => '' | |
}, | |
'age' => { | |
'type' => Integer, | |
'value' => 0 | |
}, | |
'human' => { | |
'type' => Boolean, | |
'value' => false | |
}, | |
'address' => { | |
'type' => Optional[Address], | |
'value' => undef | |
}, | |
'created' => Time | |
} | |
}, | |
PersonHandler => { | |
functions => { | |
'create' => Callable[ | |
[Person], | |
Tuple[Person, String]], | |
'delete' => Callable[String], | |
'read' => Callable[ | |
[String], | |
Person], | |
'update' => Callable[ | |
[String, Person], | |
Person] | |
} | |
}, | |
Time => { | |
functions => { | |
'add' => Callable[ | |
[Integer], | |
Time], | |
'add_date' => Callable[ | |
[Integer, Integer, Integer], | |
Time], | |
'after' => Callable[ | |
[Time], | |
Boolean], | |
'append_format' => Callable[ | |
[Array[Integer[0, 255]], String], | |
Array[Integer[0, 255]]], | |
'before' => Callable[ | |
[Time], | |
Boolean], | |
'clock' => Callable[ | |
[0, 0], | |
Tuple[Integer, Integer, Integer]], | |
'date' => Callable[ | |
[0, 0], | |
Tuple[Integer, Integer, Integer]], | |
'day' => Callable[ | |
[0, 0], | |
Integer], | |
'equal' => Callable[ | |
[Time], | |
Boolean], | |
'format' => Callable[ | |
[String], | |
String], | |
'gob_encode' => Callable[ | |
[0, 0], | |
Array[Integer[0, 255]]], | |
'hour' => Callable[ | |
[0, 0], | |
Integer], | |
'i_s_o_week' => Callable[ | |
[0, 0], | |
Tuple[Integer, Integer]], | |
'in' => Callable[ | |
[Optional], | |
Time], | |
'is_zero' => Callable[ | |
[0, 0], | |
Boolean], | |
'local' => Callable[ | |
[0, 0], | |
Time], | |
'location' => Callable[ | |
[0, 0], | |
Optional], | |
'marshal_binary' => Callable[ | |
[0, 0], | |
Array[Integer[0, 255]]], | |
'marshal_j_s_o_n' => Callable[ | |
[0, 0], | |
Array[Integer[0, 255]]], | |
'marshal_text' => Callable[ | |
[0, 0], | |
Array[Integer[0, 255]]], | |
'minute' => Callable[ | |
[0, 0], | |
Integer], | |
'month' => Callable[ | |
[0, 0], | |
Integer], | |
'nanosecond' => Callable[ | |
[0, 0], | |
Integer], | |
'round' => Callable[ | |
[Integer], | |
Time], | |
'second' => Callable[ | |
[0, 0], | |
Integer], | |
'string' => Callable[ | |
[0, 0], | |
String], | |
'sub' => Callable[ | |
[Time], | |
Integer], | |
'truncate' => Callable[ | |
[Integer], | |
Time], | |
'u_t_c' => Callable[ | |
[0, 0], | |
Time], | |
'unix' => Callable[ | |
[0, 0], | |
Integer], | |
'unix_nano' => Callable[ | |
[0, 0], | |
Integer], | |
'weekday' => Callable[ | |
[0, 0], | |
Integer], | |
'year' => Callable[ | |
[0, 0], | |
Integer], | |
'year_day' => Callable[ | |
[0, 0], | |
Integer], | |
'zone' => Callable[ | |
[0, 0], | |
Tuple[String, Integer]] | |
} | |
} | |
} | |
}] | |
want: | |
type Example = TypeSet[{ | |
pcore_uri => 'http://puppet.com/2016.1/pcore', | |
pcore_version => '1.0.0', | |
name_authority => 'http://puppet.com/2016.1/runtime', | |
name => 'Example', | |
version => '0.1.0', | |
types => { | |
Address => { | |
attributes => { | |
'line_one' => { | |
'type' => String, | |
'value' => '' | |
} | |
} | |
}, | |
ContainedRes => { | |
annotations => { | |
Lyra::Resource => { | |
'provided_attributes' => ['id'], | |
'relationships' => { | |
'owner' => { | |
'type' => OwnerRes, | |
'kind' => 'container', | |
'cardinality' => 'one', | |
'keys' => ['owner_id', 'id'] | |
} | |
} | |
} | |
}, | |
attributes => { | |
'id' => { | |
'type' => Optional[String], | |
'value' => undef | |
}, | |
'owner_id' => String, | |
'stuff' => String | |
} | |
}, | |
OwnerRes => { | |
annotations => { | |
Lyra::Resource => { | |
'provided_attributes' => ['id'], | |
'relationships' => { | |
'mine' => { | |
'type' => ContainedRes, | |
'kind' => 'contained', | |
'cardinality' => 'many', | |
'keys' => ['id', 'owner_id'] | |
} | |
} | |
} | |
}, | |
attributes => { | |
'id' => { | |
'type' => Optional[String], | |
'value' => undef | |
}, | |
'phone' => String | |
} | |
}, | |
Person => { | |
attributes => { | |
'name' => { | |
'type' => String, | |
'value' => '' | |
}, | |
'age' => { | |
'type' => Integer, | |
'value' => 0 | |
}, | |
'human' => { | |
'type' => Boolean, | |
'value' => false | |
}, | |
'address' => { | |
'type' => Optional[Address], | |
'value' => undef | |
}, | |
'created' => { | |
'type' => Optional[Timestamp], | |
'value' => undef | |
} | |
} | |
}, | |
PersonHandler => { | |
functions => { | |
'create' => Callable[ | |
[Person], | |
Tuple[Person, String]], | |
'delete' => Callable[String], | |
'read' => Callable[ | |
[String], | |
Person], | |
'update' => Callable[ | |
[String, Person], | |
Person] | |
} | |
} | |
} | |
}] | |
FAIL | |
FAIL github.com/lyraproj/lyra/cmd/goplugin-example/example 0.024s | |
Error: Tests failed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment