New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create PHP configuration test support. #196

Merged
merged 17 commits into from Jul 6, 2013

Conversation

Projects
None yet
2 participants
@koemu

koemu commented Jul 4, 2013

Hi, Mr. mizzy.

Thank you very much for your time at hbstudy#45.

I'm added PHP configuration check. However, There is no confidence in testcode.
When you have a time, please check this testcode. Then please advice for me.

Thanks.

Yuichiro Saito (@koemu)

Note: Usage

describe php_config('memory_limit') do
  it { should match_ini_value '128M' }
end
@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Jul 4, 2013

Owner

Thnaks! I will check it later.

Owner

mizzy commented Jul 4, 2013

Thnaks! I will check it later.

@koemu

This comment has been minimized.

Show comment
Hide comment
@koemu

koemu Jul 4, 2013

I appreciate it.

koemu commented Jul 4, 2013

I appreciate it.

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Jul 4, 2013

Owner

I think this syntax is better because this is same as linux_kernel_parameter.

describe php_config('memory_limit') do
  its(:value) { should eq '128M' }
end
Owner

mizzy commented Jul 4, 2013

I think this syntax is better because this is same as linux_kernel_parameter.

describe php_config('memory_limit') do
  its(:value) { should eq '128M' }
end
@koemu

This comment has been minimized.

Show comment
Hide comment
@koemu

koemu Jul 5, 2013

Thank you for review my code!
Update code based on your advice. Then I'll repost a "Pull Request".

koemu commented Jul 5, 2013

Thank you for review my code!
Update code based on your advice. Then I'll repost a "Pull Request".

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Jul 5, 2013

Owner

If you update your code and push to this branch, this pull request will be updated.

So you don't need to resend a pull request.

Owner

mizzy commented Jul 5, 2013

If you update your code and push to this branch, this pull request will be updated.

So you don't need to resend a pull request.

@koemu

This comment has been minimized.

Show comment
Hide comment
@koemu

koemu Jul 5, 2013

So you don't need to resend a pull request.

Sorry about that.

koemu commented Jul 5, 2013

So you don't need to resend a pull request.

Sorry about that.

@koemu

This comment has been minimized.

Show comment
Hide comment
@koemu

koemu Jul 5, 2013

I'm just update "php_config".
Please check it, again.

Note: Usage

describe 'php config' do
  context php_config('memory_limit') do
    its(:value) { should eq '128M' }
  end 

  context php_config('default_mimetype') do
    its(:value) { should match /text\/html/ }
  end 

  context php_config('default_socket_timeout') do
    its(:value) { should <= 60 }
  end 
end

koemu commented Jul 5, 2013

I'm just update "php_config".
Please check it, again.

Note: Usage

describe 'php config' do
  context php_config('memory_limit') do
    its(:value) { should eq '128M' }
  end 

  context php_config('default_mimetype') do
    its(:value) { should match /text\/html/ }
  end 

  context php_config('default_socket_timeout') do
    its(:value) { should <= 60 }
  end 
end
@mizzy

View changes

Show outdated Hide outdated lib/serverspec/type/php_config.rb
@koemu

This comment has been minimized.

Show comment
Hide comment
@koemu

koemu Jul 6, 2013

Sorry. I'll verify.

koemu commented Jul 6, 2013

Sorry. I'll verify.

@mizzy mizzy merged commit 685b22b into mizzy:master Jul 6, 2013

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Jul 6, 2013

Owner

Thanks.

I've changed how to write test code recently, so I've fixed tests and merged your pull request.

This resource type will be very useful.Thanks a lot!

Owner

mizzy commented Jul 6, 2013

Thanks.

I've changed how to write test code recently, so I've fixed tests and merged your pull request.

This resource type will be very useful.Thanks a lot!

@koemu

This comment has been minimized.

Show comment
Hide comment
@koemu

koemu Jul 8, 2013

Thank you very much for your coding advice, too.

(From here, I written in Japanese.)

テストコードの記述に際して、お手数をおかけして恐縮でした。
いただいたアドバイスとコードを基に、次回のPull Requestでは完成度を上げて行くようにします。
また、今回のPHPの設定テストが、皆様のお役に立てば幸いです。

どうもありがとうございました。

koemu commented Jul 8, 2013

Thank you very much for your coding advice, too.

(From here, I written in Japanese.)

テストコードの記述に際して、お手数をおかけして恐縮でした。
いただいたアドバイスとコードを基に、次回のPull Requestでは完成度を上げて行くようにします。
また、今回のPHPの設定テストが、皆様のお役に立てば幸いです。

どうもありがとうございました。

@koemu koemu deleted the koemu:php-config-test branch Jul 8, 2013

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Jul 8, 2013

Owner

こちらこそありがとうございました。プルリクエスト送って頂くだけでもとてもありがたいので、あまり難しく考えずに、お気軽に送ってください。

php.ini まわりはトラブルが起きやすいので、こんな風に簡単にテストできる仕組みがあると、とても役立つと思います。

ありがとうございました。

Owner

mizzy commented Jul 8, 2013

こちらこそありがとうございました。プルリクエスト送って頂くだけでもとてもありがたいので、あまり難しく考えずに、お気軽に送ってください。

php.ini まわりはトラブルが起きやすいので、こんな風に簡単にテストできる仕組みがあると、とても役立つと思います。

ありがとうございました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment