Chef spec错误:预期“执行[...]”操作:运行到Chef运行。其他执行资源:

时间:2015-11-19 05:41:03

标签: chef devops chefspec

我收到chefspec错误,如标题所示。以下是我收到错误的配方资源和规范:

资源:

<body>

<include file="Common:tracking" />   

<include file="Common:header" />

<div class="container">

    <div class="section">

        <div class="wrapshow">

            <div class="body">

                <div class="article-list">

                    <ul>

                    <volist name="blog_list" id="item">

                        <li>

                            <div class="head">

                                <a href="{$item.href}"

                                        class="btn_view_detail"

                                        ><img src="{$item.url_picture}" alt="{$item.title}" title="{$item.title}" /></a>

                            </div><!-- end head -->

                            <div class="body">

                                <h3>

                                    <a href="{$item.href}"

                                            class="btn_view_detail" >{$item.title}</a>

                                </h3>

                                <div class="tag">

                                    <!--

                                    <a href="">Blogging</a>

                                    |

                                    <a href="">Leave a comment</a>

                                    !-->

                                </div><!-- end tag -->

                                <div class="con">

                                    {$item.content}

                                </div><!-- end con -->

                                <div class="bar">

                                    <a href="{$item.href}"

                                       class="link btn_view_detail">Details<i class="iconfont icon-arrows-right-bottom"></i></a>

                                    <a href="{$item.href}"

                                       class="date btn_view_detail">{$item.dateline_post|date='m/d/Y',###}</a>

                                </div><!-- end bar -->

                            </div><!-- end body -->

                        </li>

                    </volist>

                    </ul>

                </div><!-- end article-list -->

                <div class="paging">

                    {$page}

                </div><!-- end paging -->

            </div><!-- end body -->

            <div class="site">
    <div class="section">
        <div class="serve-apply">
            <div class="body">
                <ul>
                    <volist name="index_mid4" id="item">
                        <li>
                            <h4><a href="{$item.url}">{$item.title}</a></h4>
                            {$item.content}
                            <i class="{$item.title_sub}"></i>
                        </li>
                    </volist>
                </ul>
            </div><!-- end body -->
            <div class="side shake-an">
                <form action="{:U('Contact/quickAdd')}" class="frm_contact">
                <input type="hidden" name="type" value="1" />
                <h3>Request <em>FREE</em> Trial</h3>
                <div class="form-element">
                    <input type="text" class="form-text blue" name="customer_name" id="username" placeholder="Full Name" />
                    <label for="username" class="iconfont icon-user"></label>
                </div><!-- end form-element -->
                <div class="form-element">
                    <input type="text" class="form-text blue" name="email" id="username" placeholder="Email" />
                    <label for="username" class="iconfont icon-letter"></label>
                </div><!-- end form-element -->
                <div class="form-element">
                    <input type="text" class="form-text blue" name="city" id="username" placeholder="Preferred City" />
                    <label for="username" class="iconfont icon-map"></label>
                </div><!-- end form-element -->
                <div class="form-element last">
                    <button type="submit">Submit</button>
                </div><!-- end form-element -->
                </form>
            </div><!-- end side -->
        </div><!-- end serve-apply -->
    </div><!-- end section -->
                <div class="categories">

                    <div class="head">

                        <h3>categories</h3>

                    </div><!-- end head -->

                    <div class="body">

                        <ul>

                            <volist name="category_list" id="item">

                                <li><a href="{$item.href}"><em>{$item['title']}</em>

                                    <i class="num"></i></a></li>

                            </volist>

                        </ul>

                    </div><!-- end body -->

                </div><!-- end categories -->

规格:

Uri("pack://application:,,,/Resources/" + path)

关于如何解决它的任何想法? 谢谢!

1 个答案:

答案 0 :(得分:2)

您为ChefSpec资源匹配器提供的值是资源的名称,在本例中为'generate ssl cert for simple https file server'。所以你的匹配器应该看起来像run_execute('generate ssl cert for simple https file server').with(command: 'openssl etc etc')

我不确定你对第二个期望的目标是什么。