LKDevelopment / hetzner-cloud-php-sdk

A PHP SDK for the Hetzner Cloud API
MIT License
104 stars 51 forks source link

Missing server create fields #94

Open cosmohdx opened 1 year ago

cosmohdx commented 1 year ago

This commit adds the missing fields public_net and placement_group to server create functions.

mikebarlow commented 1 year ago

Any chance of getting this merged in and released soon? Would save me a ton of time having to maintain a fork! 🙏

LKaemmerling commented 1 year ago

Sure sorry I missed it! Could you maybe add a test too? Just to make sure it works as expected :)

mikebarlow commented 1 year ago

The package as it stands doesn't even have tests for creating servers, so how do you know server creation works at the moment? 😉

LKaemmerling commented 1 year ago

@mikebarlow yes correct, however if there are new features it should be tried to introduce tests where they are missing :) And yes the create server part is not well testes.

cosmohdx commented 10 months ago

The package as it stands doesn't even have tests for creating servers, so how do you know server creation works at the moment? 😉

I just used it. But you are right, tests are missing. May I add them or will the tests just stay here for an other 8 month ;)

LKaemmerling commented 10 months ago

It would be good if there are tests :) even if they are only for your change.

cosmohdx commented 10 months ago

I just checked, you have public_net already inside your tests. Only the parameter at creation was missing.

cosmohdx commented 10 months ago

I added the https://docs.hetzner.cloud/#placement-groups section to the api for tests with the placement group. The placement group field at the server is only an id, needs to be existing, idk what kind of test you are expecting.

LKaemmerling commented 9 months ago

Hey @cosmohdx,

sorry i was on vacation. What i expect is simply that the whole passing through is tested, so that the expected values are on the correct places :) It looks like there a a few failing tests. Could you maybe fix them? Then everything is good to go :)